LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-09-2004, 12:27 PM   #1
di11rod
Member
 
Registered: Jan 2004
Location: Austin, TEXAS
Distribution: CentOS 6.5
Posts: 211

Rep: Reputation: 32
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
 
Old 06-09-2004, 01:09 PM   #2
di11rod
Member
 
Registered: Jan 2004
Location: Austin, TEXAS
Distribution: CentOS 6.5
Posts: 211

Original Poster
Rep: Reputation: 32
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
 
Old 06-09-2004, 02:16 PM   #3
di11rod
Member
 
Registered: Jan 2004
Location: Austin, TEXAS
Distribution: CentOS 6.5
Posts: 211

Original Poster
Rep: Reputation: 32
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Hosting? nr5 Linux - Software 10 06-03-2005 01:30 PM
virtual hosting setenv02 Linux - General 6 05-05-2005 02:35 AM
Virtual hosting... id10t Linux - Networking 4 02-02-2004 05:43 PM
Virtual Hosting - what does it actually do? gevers1 Linux - General 3 02-01-2004 09:28 AM
Virtual Hosting marson Linux - General 2 12-28-2000 08:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration