LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 09-29-2003, 09:31 PM   #1
Robin01
Member
 
Registered: Aug 2003
Posts: 104

Rep: Reputation: 15
not finding virtual host


Hello everybody.

For testing reasons i setup 2 virtual hosts.. one is called test1 and the other one is called test2...

if i was to type in test1 or test2 in the browser it doesn't find it.. but if i type in localhost it finds the first page, which is test1... if i type in the ip address of the machine it finds test1..
the webpages are all internal.. so i want to be able to type in either test1 or test2 and get the page... is this possible without setting up the dns table....

i tried from a w2k machine and its the same problem....
modified the host file but this didn't help.

this is my redhat 9 , apache httpd.conf file for your review.
--
<VirtualHost *>
ServerAdmin ddarkman@hotmail.com
ServerName comgen
ServerSignature email
DocumentRoot /var/www/html/test1
DirectoryIndex index.php index.html index.htm index.shtml
LogLevel debug
HostNameLookups off
</VirtualHost>

<VirtualHost *>
ServerAdmin ddarkman@hotmail.com
ServerName test2
ServerSignature email
DocumentRoot /var/www/html/test2
DirectoryIndex index.php index.html index.htm index.shtml
LogLevel debug
HostNameLookups off
</VirtualHost>
 
Old 09-30-2003, 01:17 PM   #2
LarryDoliver
Member
 
Registered: Mar 2003
Posts: 126

Rep: Reputation: 17
when you state that you modified the hosts file, you mean you did:
192.168.1.1 [realhostname] test1 test2

Can you ping both test1 and test2?
 
Old 10-01-2003, 07:45 AM   #3
Robin01
Member
 
Registered: Aug 2003
Posts: 104

Original Poster
Rep: Reputation: 15
modified the host file on my win2000 machine as such
192.168.2.9 test1
192.168.2.9 test2

on the linux machine i basically what i put on the main posting..
-on the linux machine, if i typed in http://test1 it wouldn't find the page but if i typed in localhost it finds the test1...
 
Old 10-01-2003, 08:30 AM   #4
LarryDoliver
Member
 
Registered: Mar 2003
Posts: 126

Rep: Reputation: 17
so, your linux box does know that it have three names (localhost, test1 and test2).

edit /etc/hosts and add "test1" and "test2" to the line that contains localhost...
 
  


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
Need Help Finding Java Virtual Machine! pmorkert Linux - Newbie 0 07-29-2003 09:19 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:21 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration