LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 10-16-2004, 11:27 AM   #1
E-Rick
LQ Newbie
 
Registered: Aug 2003
Location: Belgium
Distribution: Red Hat Linux 8
Posts: 17

Rep: Reputation: 0
Virtual servers on internal network (httpd/named)


Hi,

I run Apache on Redhat 8. Http works successfully, I can view the info.php file and also can browse successfully. Now I am trying to set up several virtual servers on my internal network. I don't need static addresses, as it's only going to be used internally. I also want to use the DNS method, since I have only one network card. I changed the httpd.conf file, restarted httpd without errors, but when I type the name of the virtual server in my browser, it's not found (eg www.test.com). I read a lot and saw that I also have to add entries to my dns records, but I have no idea how this works. Can anybody please give me a concrete example?

Many thanks!

E-Rick
 
Old 10-16-2004, 11:35 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
the virtual server declarations are quite likely valid, but the problem you're presumably getting stuck with is that the address can't be resolved in the first place, which is nothing to do with apache. you need to make whatever DNS solution you are providing to the network resolve those names. you need to be able to ping the server via the vvirtual host name before you get to apache level.
 
Old 10-16-2004, 11:39 AM   #3
secesh
Senior Member
 
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154

Rep: Reputation: 47
= try putting in entries in your /etc/hosts file. that works as a dns bypass.

FYI- i have a similar setup, though with static address. I use a local server as a test before going live with changes. when i want to access a site locally, i put entries into my /etc/hosts for the sites being worked on, then comment them out before posting.

they look like this:
Code:
<private internal ip>  mylocalsite.com
#172.25.25.25            mycommentedoutsite.com
 
Old 10-17-2004, 05:05 AM   #4
E-Rick
LQ Newbie
 
Registered: Aug 2003
Location: Belgium
Distribution: Red Hat Linux 8
Posts: 17

Original Poster
Rep: Reputation: 0
Hi,

Thanks a lot for the replies. I realize that it's a DNS problem, and thanks for the suggestion of the hosts file, I thought about that too, and it's good as a temp solution. But I read that the other computers in my network would not be able to access the web server that way, unless I also declare the virtual hosts in the host files on those respective servers. Since my purpose is the same as yours, using my virtual host server as a "template" server and other virtual hosts on my linux as "test" servers, I could use the hostfile solution, but I'd still prefer the dns solution if any possible. Also, it would learn me something on networking and maybe later it could also teach me how to set up a real web server. Many thanks if any more ideas!

E-Rick
 
Old 10-17-2004, 07:53 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
that shouldn't be a problem at all, but you've not provided any information about what dns solution you are using....
 
  


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
Apache named virtual host config darthtux Linux - Software 8 04-19-2005 02:38 AM
apache 2 named virtual servers : server path djbar Linux - Networking 0 03-21-2004 10:05 AM
Trouble with Named based Virtual hosting in Apache 2 IanChristie Linux - Networking 16 11-07-2003 02:04 PM
Virtual Host type, named or IP via SSL? Named VH is not possible? piratebiter Linux - Security 3 08-20-2003 05:27 PM
named based virtual hosting newbie nickblue Linux - Networking 9 08-04-2003 11:39 PM


All times are GMT -5. The time now is 08:16 PM.

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