Apache Server configuration support - NameVirtualHosts Problem?

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > February 2004 > NameVirtualHosts Problem?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author NameVirtualHosts Problem?
tim

2004-02-25, 12:33 pm

I have about twenty domain names pointing at one document root and
only one domain name pointing at another.

the first two virtual hosts of the twenty do not have certain
permissions that all of the other virtual hosts have.

example:

http://www.mydomain3.com/images/ -> results in an index of that
directory

http://www.mydomain1.com/images/ -> results in a forbidden response

these are both pointing at the same document root. all other names
pointing at that document root resolve the same as example 1. The odd
thing is the website is just fine. It is only when i try to access a
log file I created and the images folder index.

the config looks like this.

NameVirtualHost IP_ADDRESS

<VirtualHost *>
UseCanonicalName off
ServerName their.domain.com
DocumentRoot /home/other
</VirtualHost>

<VirtualHost IP_ADDRESS>
UseCanonicalName off
ServerName their.domain.com
DocumentRoot /home/other
</VirtualHost>

##
##
## start my multidomain vh directives
##
##

<VirtualHost IP_ADDRESS>
UseCanonicalName off
ServerName www.mydomain1.com
DocumentRoot /home/user/html
CustomLog /var/log/user/www.mydomain.com-referer_log referer
TransferLog /var/log/user/www.mydomain.com-access_log
ErrorLog /var/log/user/www.mydomain.com-error_log
</VirtualHost>

<VirtualHost IP_ADDRESS>
UseCanonicalName off
ServerName www.mydomain2.com
DocumentRoot /home/user/html
CustomLog /var/log/user/www.mydomain.com-referer_log referer
TransferLog /var/log/user/www.mydomain.com-access_log
ErrorLog /var/log/user/www.mydomain.com-error_log
</VirtualHost>

etc...


My server is FreeBSD 4.7 Apache 1.3.27

I have looked around for this topic and have come close but it has
always been a slightly different problem. With a solution that has not
worked.
Davide Bianchi

2004-02-25, 1:33 pm

tim <realjosefmengele@hotmail.com> wrote:
> NameVirtualHost IP_ADDRESS
> <VirtualHost *>
> UseCanonicalName off
> ServerName their.domain.com
> DocumentRoot /home/other
> </VirtualHost>
> <VirtualHost IP_ADDRESS>
> UseCanonicalName off
> ServerName their.domain.com
> DocumentRoot /home/other
> </VirtualHost>


Do not mix * and not-* VHosts.
Davide

--
| Even though they raised the rate for first class mail in the United
| States we really shouldn't complain -- it's still only two cents a
| day.
|
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com