LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-21-2005, 11:39 AM   #1
Fredstar
Member
 
Registered: Jul 2004
Location: Rochester, NY
Distribution: Fedora9::FreeBSD7.1
Posts: 296

Rep: Reputation: 30
Apache help


Hello,

Normally i use webmin or some other type of control to edit my httpd.conf.. However trying to be better at the simple command with no GUI im trying to set up name base virtual host. The problem im having is it allows me to create two host but both names point the the same destination. my server names are both diff, so im not sure whats going on here is a quick example.

NameVirtualHost 192.1680.8:80

<VirtualHost 192.168.0.8:80>
ServerName www.thisdomain.com
DocumentRoot /www/thisdomain/
ServerAdmin Admin@thisdomain.com
</VirtualHost>

<VirtualHost 192.168.0.8:80>
ServerName www.othersite.com
DocumentRoot /www/othersite/
ServerAdmin Admin@othersite.com
</VirtualHost>

and www.thisdomain.com and othersite.com both point to www.thisdomain.com..

Im using FC3, Selinux

and yes all files are chmod 755 and Chcon -t/u correctly

thank you
 
Old 03-21-2005, 12:06 PM   #2
Technoslave
Member
 
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
Try,

<VirtualHost *>
ServerName www.othersite.com
DocumentRoot /www/othersite/
ServerAdmin Admin@othersite.com
</VirtualHost>

for your two virtual hosts.
 
Old 03-21-2005, 12:21 PM   #3
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Rep: Reputation: 15
try using * instead of the IP. this seems to work for me, the only problem is it still defaults to the first site in the list about 50% of the time. i have a simular post in this forum asking for help.

NameVirtualHost *:80

<VirtualHost *:80>
 
  


Reply



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
Mail from Apache being rejected - Cannot route to sender apache@localhost.localdomain jimwillsher Linux - Networking 2 01-19-2006 12:41 AM
Apache 1.3.33 (debian built) and Apache SSL does not respond to the proper ports lqorg_user Linux - Networking 0 11-06-2005 04:11 PM
Strange apache trailing / problem - Slack-current, apache 1.3.33 vamp Linux - Networking 1 01-30-2005 07:28 PM
Apache Webserver 403 Forbidden Errors (User not in apache group?) Mankind75 Mandriva 4 07-08-2004 05:30 AM
apache benchmarks (apache v13 / apache v20) ; large differences between benchmarking markus1982 Linux - Software 0 02-08-2003 10:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:04 PM.

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