Been trying for the first time to change a site to ssl. Got a free (for a while) certificate from comodo.
iptables listening on 443
certificate files installed
installed mod_ssl
I added to apache virtual host configuration file the following:-
NameVirtualHost ipnumbers:443
<VirtualHost ipnumbers:443>
SSLEngine on
SSLCertificateKeyFile /path-to-certs/servkey.key
SSLCertificateFile /path-to-certs/thecert.crt
SSLCertificateChainFile /path-to-certs/thecert.ca-bundle
ServerAdmin
contact@domain.com
ServerName domain.com
ServerAlias
www.domain.com
DocumentRoot /path-to-root
ScriptAlias cgi-path
CustomLog /path-to-log
</VirtualHost>
The rest of the domains in the configuration file have:-
<VirtualHost ipnumbers:80>
ServerAdmin
contact@domain.com
ServerName domain.com
ServerAlias
www.domain.com
DocumentRoot /path-to-root
ScriptAlias cgi-path
CustomLog /path-to-log
</VirtualHost>
But when I save the file and then try to restart apache, I get a warning that httpd is not running, (98) Address already in use: make_sock: could not bind to address...
At that point if I list running httpd, there are about 10.
In my browser at that point all sites on the server are 404.
I've tried lots of ways, but nothing I do works. I have since removed the new domain entry from the virtual host file, killall httpd, stop and start httpd and apache restart to get the websites back on again.