LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 08-15-2005, 12:46 PM   #1
ekrumm
LQ Newbie
 
Registered: Jul 2005
Location: Georgia
Distribution: RH Ent. 4
Posts: 15

Rep: Reputation: 0
virtual host going to different directory


Why would a virtual host serve pages from a directory other than the one specified in the httpd.conf?

thanks!
 
Old 08-16-2005, 09:48 PM   #2
PenguinPwrdBox
Member
 
Registered: Oct 2003
Location: /illinois/chicago
Distribution: Slackware/Gentoo/FC/RHEL
Posts: 568

Rep: Reputation: 30
Could you be more specific?
 
Old 08-17-2005, 07:45 AM   #3
ekrumm
LQ Newbie
 
Registered: Jul 2005
Location: Georgia
Distribution: RH Ent. 4
Posts: 15

Original Poster
Rep: Reputation: 0
PenguinPwrdBox,
It is working now...I don't know why. The only difference between now and yesterday is where the NameVirtualHost line is. Yesterday it was above all of the virtualhost containers, today it's just above the affected containers.
I was trying to set up name based virt hosting but Apache would serve the default no content (Welcome to Red Hat...) page even though the docroot specified had pages. It wouldn't even do a dir list if I enabled it. What would overide the documentroot that I put in the virtualhost container? Does it matter if the NameVirtualHost line is above all of the virtualhost entries instead of being directly above the ones targetted?

thanks!

From the httpd.conf:

NameVirtualHost 12.163.x.x # yesterday this line was above all the virtualhost, today it is here.
<VirtualHost 12.163.x.x>
DocumentRoot "/var/www/site1"
ServerName store.site1.net
DirectoryIndex index.php index.html
<Directory "/var/www/site1">
allow from all
Options -Indexes
</Directory>
</VirtualHost>

<VirtualHost 12.163.x.x>
DocumentRoot "/var/www/site2"
ServerName fat.site2.net
DirectoryIndex index.php index.html
<Directory "/var/www/site2">
allow from all
Options -Indexes
</Directory>
</VirtualHost>
 
Old 08-20-2005, 11:21 AM   #4
XOR007
Member
 
Registered: May 2005
Location: Africa
Distribution: Ubuntu, Redhat 6.2 to 9, Centos 4, Suse 8 Ent.,Suse 9 Ent.
Posts: 51

Rep: Reputation: 15
I didn't know I could put <Directory> directives inside a vhost section. I'll try that!
 
  


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 Host abridge Linux - Software 1 04-13-2005 07:35 AM
virtual host ziggie216 Linux - General 2 12-22-2003 06:38 PM
virtual host setup atomicx Linux - General 2 12-18-2003 02:53 PM
Virtual Host |Drakehash| Linux - Networking 0 07-17-2003 03:02 PM
VIrtual host thep Linux - General 10 08-06-2002 11:28 AM


All times are GMT -5. The time now is 10:55 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration