Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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?
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.
= 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.
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!