[Sussex] Apache + SSL + virtual host

John Crowhurst fyremoon at fyremoon.net
Tue May 24 17:21:49 UTC 2005


On Tue, May 24, 2005 17:22, Diego Moore said:
> 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

Where does test.txt live? Is it in /var/www/dev.example.com/html, because
that is where you are telling Apache to look for it in the DocumentRoot.

--
John




More information about the Sussex mailing list