I need to run both http and https on the same hostnames on my server. I had everything running without SSL with hosts configured in the /etc/httpd/conf.d directory.
System: CentOS release 5.6 (Final)
Server: Apache/2.2.3
I was following the instructions here: http://shapeshed.com/journal/setting_up_mod_ssl_on_apache_centos_52/
But now:
sudo /etc/init.d/httpd restart
Responds with:
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:443
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs
[FAILED]
At the bottom of /etc/httpd/conf/httpd.conf I have:
NameVirtualHost *:80
I tried adding NameVirtualHost *:443 below that but it didn't help.
One more thing: Webmin was previously installed and that is already running at http://XXX.XXX.XXX.XXX:10000
Could that be a factor?
Any help would be greatly appreciated; as you can probably tell I'm flying by Google here I've not done this before.
Thanks!
Solved:
Prior to installing mod_ssl, httpd.conf contained:
And the mod_ssl installer had added this to the automatically created ssl.conf (in conf.d)
The duplication was naturally causing a conflict. I removed the line from httpd.conf and now it starts normally.
It looks like you already have something listening on port 443. Disable it and then try again to run Apache. You can find what is listening on that port with the following command: