You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jessica Rasku <jr...@armispiansystems.ca> on 2005/09/25 11:43:12 UTC

[users@httpd] Virtual host not being properly handled.

This seems like a stupid question, I really don't know what's going on. 
  I thought that I had it working before, but it's not working now, and 
I'm pretty sure I didn't change anything that should have had any effect 
on the virtual hosts.  My virtual host (genderoutlaws.com) is not 
working.  It serves the default virtual host instead.  The relevant 
sections of the httpd.conf (I think this is all that is relevant) are:

NameVirtualHost *:80

# Virtual host Default Virtual Host
<VirtualHost *:80>
         ServerSignature email
         ServerName www.armispiansystems.ca
         DirectoryIndex index.php index.html index.htm index.shtml
         LogLevel debug
         HostNameLookups off
</VirtualHost>


# Virtual host Gender Outlaws
<VirtualHost *:80>
         DocumentRoot /var/www/gender/html
         ServerAdmin jrasku@genderoutlaws.ca
         ServerName genderoutlaws.com
         ServerAlias *.genderoutlaws.com
         DirectoryIndex index.php index.html index.htm index.shtml
         ServerSignature email
         CustomLog logs/gender/access_log combined
</VirtualHost>

I upgraded to Apache 2.0.54 a little while ago, from the default that 
was in CentOS.  Unfortunately it seems that there are some problems 
associated with this upgrade.  This is the most annoying at this time. 
What am I missing here?

						Jessica

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual host not being properly handled.

Posted by Jessica Rasku <jr...@armispiansystems.ca>.
Davide Bianchi wrote:
> Jessica Rasku wrote:
> 
>># Virtual host Default Virtual Host
>><VirtualHost *:80>
>>        ServerSignature email
>>        ServerName www.armispiansystems.ca
>>        DirectoryIndex index.php index.html index.htm index.shtml
>>        LogLevel debug
>>        HostNameLookups off
>></VirtualHost>
>>
>># Virtual host Gender Outlaws
>><VirtualHost *:80>
>>        DocumentRoot /var/www/gender/html
>>        ServerAdmin jrasku@genderoutlaws.ca
>>        ServerName genderoutlaws.com
>>        ServerAlias *.genderoutlaws.com
>>        DirectoryIndex index.php index.html index.htm index.shtml
>>        ServerSignature email
>>        CustomLog logs/gender/access_log combined
>></VirtualHost>\
> 
> 
> How is that your 'default' Virtual Host doesn't have a DocumentRoot entry ?

OK, that's an issue, it works, but thank you for pointing that out.  It 
seems that something I did fixed the problem with the genderoutlaws 
virtual host.  I should probably move some of the configuration that is 
for ``all hosts'' into the default virtual host configuration.  That's 
where it should be.  Thanks for pointing that out.

							Jessica

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual host not being properly handled.

Posted by Davide Bianchi <da...@onlyforfun.net>.
Jessica Rasku wrote:
> # Virtual host Default Virtual Host
> <VirtualHost *:80>
>         ServerSignature email
>         ServerName www.armispiansystems.ca
>         DirectoryIndex index.php index.html index.htm index.shtml
>         LogLevel debug
>         HostNameLookups off
> </VirtualHost>
> 
> # Virtual host Gender Outlaws
> <VirtualHost *:80>
>         DocumentRoot /var/www/gender/html
>         ServerAdmin jrasku@genderoutlaws.ca
>         ServerName genderoutlaws.com
>         ServerAlias *.genderoutlaws.com
>         DirectoryIndex index.php index.html index.htm index.shtml
>         ServerSignature email
>         CustomLog logs/gender/access_log combined
> </VirtualHost>\

How is that your 'default' Virtual Host doesn't have a DocumentRoot entry ?

Davide

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual host not being properly handled.

Posted by Jessica Rasku <jr...@armispiansystems.ca>.
matt-nc wrote:
> At 02:43 AM 9/25/05 -0700, you wrote:
> 
>> This seems like a stupid question, I really don't know what's going 
>> on.  I thought that I had it working before, but it's not working now, 
>> and I'm pretty sure I didn't change anything that should have had any 
>> effect on the virtual hosts.  My virtual host (genderoutlaws.com) is 
>> not working.  It serves the default virtual host instead.  The 
>> relevant sections of the httpd.conf (I think this is all that is 
>> relevant) are:
>>
>> NameVirtualHost *:80
>>
>> # Virtual host Default Virtual Host
>> <VirtualHost *:80>
>>         ServerSignature email
>>         ServerName www.armispiansystems.ca
>>         DirectoryIndex index.php index.html index.htm index.shtml
>>         LogLevel debug
>>         HostNameLookups off
>> </VirtualHost>
>>
>>
>> # Virtual host Gender Outlaws
>> <VirtualHost *:80>
>>         DocumentRoot /var/www/gender/html
> 
> 
> 
> Just wondering -- I'm using Mandriva and the default DocumentRoot is 
> /var/www/html.  Is your path to the directory correct?

The default is /var/www/html the genderoutlaws is /var/www/gender

> Also in my config declarations I had to add some things.
> 
> <VirtualHost *:80>
>      ServerName blah-blah
>      DocumentRoot /blah/blah/blah
>      <Directory /blah/blah/blah (same as DocumentRoot)>
>      Options blah blah blah
>      AllowOverride All
>      <ifModule mod_access.c>
>           Order Allow,Deny
>           Allow from all
>      </ifModule>
>      </Directory>
> </VirtualHost>

I have some features in the ``all hosts'' site, and some that are in the 
<VirtualHost > dirrectives.  They probably should be consistantly in one 
place or the other.  Will work on that over the next while.

> And, really basic but in case it slipped your mind, do you still have a 
> reference to the genderoutlaws in your hosts file and did you restart 
> the httpd service after any changes?

genderoutlaws.com is in my DNS server database, and I did restart the 
server.  I think one of the things that I was seeing was actually a 
problem with caching in my client rather than a problem with what was 
being served.  The things you don't remember seem pretty minor, but they 
can really confuse you.

							Jessica

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual host not being properly handled.

Posted by matt-nc <nc...@triad.rr.com>.
At 02:43 AM 9/25/05 -0700, you wrote:
>This seems like a stupid question, I really don't know what's going on.  I 
>thought that I had it working before, but it's not working now, and I'm 
>pretty sure I didn't change anything that should have had any effect on 
>the virtual hosts.  My virtual host (genderoutlaws.com) is not 
>working.  It serves the default virtual host instead.  The relevant 
>sections of the httpd.conf (I think this is all that is relevant) are:
>
>NameVirtualHost *:80
>
># Virtual host Default Virtual Host
><VirtualHost *:80>
>         ServerSignature email
>         ServerName www.armispiansystems.ca
>         DirectoryIndex index.php index.html index.htm index.shtml
>         LogLevel debug
>         HostNameLookups off
></VirtualHost>
>
>
># Virtual host Gender Outlaws
><VirtualHost *:80>
>         DocumentRoot /var/www/gender/html


Just wondering -- I'm using Mandriva and the default DocumentRoot is 
/var/www/html.  Is your path to the directory correct?

Also in my config declarations I had to add some things.

<VirtualHost *:80>
      ServerName blah-blah
      DocumentRoot /blah/blah/blah
      <Directory /blah/blah/blah (same as DocumentRoot)>
      Options blah blah blah
      AllowOverride All
      <ifModule mod_access.c>
           Order Allow,Deny
           Allow from all
      </ifModule>
      </Directory>
</VirtualHost>

And, really basic but in case it slipped your mind, do you still have a 
reference to the genderoutlaws in your hosts file and did you restart the 
httpd service after any changes?

Matt



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org