virtual hosting head scratcher
I have a computer at home and one at work that are both running Apache2 Apache-AdvancedExtranetServer (the default install that ships with Mandrake 9.2).
At home, I've got virtual hosting working just fine with about 4 different domains getting served. At work, I can't get any subdomains to be served. We've got two different domains pointing at this IP and regardless of what URL I request, the root page is served from /var/www/html/ Here is my /etc/httpd/conf/vhosts/Vhosts.conf file: NameVirtualHost *:80 <VirtualHost *:80> ServerName 216-165-210-197.crescentb.com DocumentRoot /var/www/html/ HostnameLookups on Options +Includes AddHandler server-parsed .html </VirtualHost> <VirtualHost *:80> ServerName www.norwoodtower.com ServerAlias norwoodtower.com *.norwoodtower.com DocumentRoot /var/www/html/nt </VirtualHost> I wish there was more explicit logging available. For instance, /var/log/access_log only shows the request came in for / --- it doesn't say what domain, etc. What are the other dependencies required for virtual hosting to work? Anyone know how to enable verbose logging in Apache? Appreciatively, di11rod |
more information
Here's some more info...
So I created an info.php file and put it in the root directory (/var/www/html), then called it with the URL www.norwoodtower.com Several interesting environmental variables are being set: HTTP_HOST norwoodtower.com SERVER_NAME norwoodtower.com DOCUMENT_ROOT /var/www/html/nt SCRIPT_FILENAME /var/www/html/info.php Why won't the server dip into the proper nt directory? Permissions are fine, etc. If I request the URL www.norwoodtower.com/nt then it serves the correct page. Any ideas? thanks in advance, di11rod |
figured it out
While troubleshooting a seperate issue, I had inadvertantly added this
VirtualDocumentRootIP /var/www/html to the /etc/httpd/conf/httpd2.conf file. That destroys namebased virtual hosting in apache. di11rod |
All times are GMT -5. The time now is 05:09 AM. |