Generally, you'll configure the SSL settings that are not necessarily specific to a given host (e.g. SSLCipherSuites
) in /etc/httpd/conf.d/ssl.conf
(or similar in other distributions), but configure what's specific to a given host in its own VirtualHost
(with the appropriate port), more or less like this:
<IfModule mod_ssl.c>
<VirtualHost *:443>
# ...
SSLEngine on
SSLCertificateFile /etc/ssl/certs/host.pem
SSLCertificateKeyFile /etc/ssl/private/host.key
DocumentRoot /path/to/https/root
</VirtualHost>
</IfModule>
<VirtualHost *:80>
# ...
DocumentRoot /path/to/plain-http/root
</VirtualHost>
You could put the part with into its own file in /etc/httpd/conf.d/
or within ssl.conf
.
It depends on the distribution. On Debian/Ubuntu, you'll probably have the general SSL configuration in /etc/apache2/mods-available/ssl.conf
and the site/virtualhost specific configuration in /etc/apache2/sites-available/some-name.conf
.