Graeme Merrall wrote:
>
> Hi all.
> PLaying with having SSL and Non-SSL hsts in the same config file for one
> server. I downloaded the example from linuxrox.com but I'm having a few
> problems, so I'm looking for some pointers.
[snip]
Since this seems to be coming up a lot, here's an example... I obviously
haven't actually tested this config file, but it's based on a real one,
so it should be OK... If the general consensus is that it's correct,
I'll add it to the FAQ on the webpage (so please let me know if you spot
any [deliberate] mistakes!).
#############################################################
# example config for SSL and Non-SSL hosts in the same config
# main server is an SSL one...
#
ServerName ssl.fictional.co
ServerType standalone
ServerAdmin www@ssl.fictional.co
User www
Group www
Port 443
Listen 443
Listen 80
SSLVerifyClient 0
SSLVerifyDepth 10
SSLCertificateKeyFile /www/certs/ssl.fictional.co.key
SSLCertificateFile /www/certs/ssl.fictional.co.cert
DocumentRoot /www/hosts/ssl.fictional.co/docs
TransferLog /www/hosts/ssl.fictional.co/logs/access.log
SSLLogFile /www/hosts/ssl.fictional.co/logs/ssl.log
ErrorLog /www/hosts/ssl.fictional.co/logs/error.log
PidFile /www/logs/httpsd.pid
# and a non-SSL one...
<VirtualHost www.fictional.co:80>
SSLDisable
Port 80
DocumentRoot /www/hosts/www.fictional.co/docs
TransferLog /www/hosts/www.fictional.co/logs/access.log
ErrorLog /www/hosts/www.fictional.co/logs/error.log
</VirtualHost>
# and another SSL one...
<VirtualHost another-ssl.fictional.co:443>
Port 443
SSLVerifyClient 0
SSLVerifyDepth 10
SSLCertificateKeyFile /www/certs/another-ssl.fictional.co.key
SSLCertificateFile /www/certs/another-ssl.fictional.co.cert
DocumentRoot /www/hosts/another-ssl.fictional.co/docs
TransferLog /www/hosts/another-ssl.fictional.co/logs/access.log
SSLLogFile /www/hosts/another-ssl.fictional.co/logs/ssl.log
ErrorLog /www/hosts/another-ssl.fictional.co/logs/error.log
</VirtualHost>
cheers,
Adam
--
Adam Laurie Tel: +44 (181) 742 0755
A.L. Digital Ltd. Fax: +44 (181) 742 5995
Voysey House
Barley Mow Passage http://www.aldigital.co.uk
London W4 4GB mailto:adam@algroup.co.uk
UNITED KINGDOM PGP key on keyservers