[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apache2 virtual hosts only displaying default site



On 07/05/2008 13:22, Craig Hurley wrote:
Hello,

I'm having a problem where only the default site is being displayed by apache. If I visit http://deb01/ I get the content in directory "a". If I visit http://test/ I get the content in directory "a", when I'm expecting to get the content from directory "b".

The reliant web server versions are: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c.

I've included some other information below that may be reliant. Does anyone know what's wrong with my setup?

TIA,
Craig.


deb01:/home/craig#cat /etc/apache2/sites-enabled/000-default
NameVirtualHost *

<VirtualHost *>

        Servername deb01
        ServerAdmin webmaster@localhost
        Documentroot /home/craig/www/a
        CustomLog /var/log/apache2/access.log combined
        IndexOptions FancyIndexing FoldersFirst IgnoreCase VersionSort

</VirtualHost>


deb01:/home/craig#cat /etc/apache2/sites-enabled/test
<VirtualHost test:80>

        Servername test
        ServerAdmin webmaster@localhost
        Documentroot /home/craig/www/b
        CustomLog /var/log/apache2/access.log combined
        IndexOptions FancyIndexing FoldersFirst IgnoreCase VersionSort

</VirtualHost>




I changed the site config files (see below) and everything works as expected.

Regards,
Craig.



deb01:/home/craig#cat /etc/apache2/sites-enabled/000-default
NameVirtualHost *:80
NameVirtualHost *:443

<VirtualHost *:80>

        Servername deb01
	...

</VirtualHost>


<VirtualHost *:443>

        Servername deb01
	<IfModule mod_ssl.c>
                SSLEngine on
        </IfModule>
	...

</VirtualHost>

deb01:/home/craig#cat /etc/apache2/sites-enabled/test
<VirtualHost *:80>

        Servername test
	...

</VirtualHost>


<VirtualHost *:443>

        Servername test
	<IfModule mod_ssl.c>
                SSLEngine on
        </IfModule>
	...

</VirtualHost>


Reply to: