Bug#267477: Yet another way to easily set up SSL
[B
I have yet another way to easily set up a SSL server. It is based
heavily on the method by txemi, but I didn't want to duplicate my
default configuration. I wanted my SSL server to be identical to my
normal site, so I pulled the guts of sites-available/default into its
own file, sites-available/common, add 'Include sites-available/common'
and then copy the file to sites-available/ssl. Finally add the SSL
specific parts to the top of ssl.
So, my sites-available/default looks like:
----- Begin sites-available/default -----
NameVirtualHost *:80
<VirtualHost *:80>
Include sites-available/common
</VirtualHost>
----- End sites-available/default -----
sites-available/ssl looks like:
----- Begin sites-available/ssl -----
<IfModule mod_ssl.c>
Listen 443
NameVirtualHost *:443
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key
Include sites-available/common
</VirtualHost>
</IfModule>
----- End sites-available/ssl -----
This way I don't have to maintain to mostly identical files, and I can
still make SSL/non-SSL specific changes.
Omen
--
T-Shirt saying: Don't let school interfere with your education.
Reply to: