简体   繁体   中英

SSL doesn't work after update httpd in centos

I've wrongly launched the command

sudo yum install httpd

in the command line of a server of mine. SInce httpd was already installed, this command have reinstalled/updated httpd but after that I was no more able to start httpd: launching the command

sudo /etc/init.d/httpd restart

I received the error:

Starting httpd: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:443 no listening sockets available, shutting down

so looking deeper in the configuration files I saw that the

Listen 443

was both in the conf/httpd.conf and in conf.d/ssl.conf. Commenting one of them the httpd service starts correctly but seems that SSL is not working properly because if I access to some pages I know are protected under SSL i receive an

404 Not found

Someone knows which configuration coudl I have corrupted with that update? How can I fix it?

I figured it out. There were two _VirtualHost default:443 (one coming from httpd.conf and one coming from ssl.conf).

Removing one of them (I suggest removing the httpd.conf 's one to leave all the ssl configurations in ssl.conf file) everything restarted working properly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM