[Sussex] Apache + SSL + virtual host
Diego Moore
diego.moore at gmail.com
Tue May 24 16:44:13 UTC 2005
Hi all,
I'm having a problem setting up a vritual host on a RH EL 3 server.
Listen 0.0.0.0:80
ServerName www.dict8login.com
DocumentRoot "/var/www/html"
SSLEngine off
<VirtualHost *:443>
DocumentRoot /var/www/html
ServerName www.example.com
<Directory "/var/www/html">
allow from all
Options +Indexes
</Directory>
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/example.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/example.key
SSLCACertificateFile /etc/httpd/conf/ca-bundle/chain.crt
</VirtualHost>
Which works ok and has been for a while. But I now need to add a
virtual host for development. So I've added:
NameVirtualHost aaa.bbb.ccc.ddd:80
<VirtualHost dev.example.com:80>
DocumentRoot /var/www/dev.example.com/html
ServerName dev.example.com
</VirtualHost>
And I get:
[root at www root]# apachectl configtest
Syntax OK
However when I visit http://dev.example.com/test.txt I get:
Not Found
The requested URL /test.txt was not found on this server.
Apache Server at dev.example.com Port 80 <--- note server name!
I'm confused...
TIA
BTW: example.com and dev.example.com resolve to the same IP address
More information about the Sussex
mailing list