I am trying to set up virtual hosts on my Centos 5.5 server with SSL. I've been setting up Apache with "normal" virtual hosts for ages so I know how to do that but have never attempted to set up one or more of them with their own SSL certificates, each on a separate IP address.
I've set up the first site with normal VirtualHost on *:80 and now I want to give the site the ability to be accessed on port 443. I've so far done the following:
In the http.conf file:
01. Added Listen 22.214.171.124:443 below the Listen 126.96.36.199:80
02. Added NameVirtualHost *:443 under the NameVirtualHost *:80
03. Added a dummy :443 default vhost entry hear the top of the httpd.conf file
04. Added the following to the httpd.conf file
When I restart Apache I get a socket error as follows:
(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
I have a feeling that it has something to do with the fact that I haven't yet added the IP for SSL certificate to the Network config on the server but to be honest I'm not sure how to do that or even that I need to? I know when I set up certs on our Windows servers I need to add the new IP and gateway to the network setup but not sure whether it's the same for CentOS.
Any help greatly appreciated