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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
If its purely for internal consumption, you can call it anything you like, although you'll need an equiv entry in /etc/hosts so the browser can find it, or a local DNS server.
Personally, like the fact that you should only use private ip ranges for this eg 192.168.x.x I (and others) also create fictitious domain names, so it's obvious if it escapes onto the internet it will get dropped instead of ending up at a real (not yours) website.
site1.domain.cxm # note cxm is not a valid tld on the web.
If this is for work (even if its only internal), you should get a proper name.
First thing with hosting a virtual host, if you are using multiple different domain names, if I remember right you have to uncomment the following line in the httpd.conf file, I can't remember this for certain if it's this line, there is certainly one line it has to be done but from memory it should look like the following.
Just delete the #, you may possible want to change the listen port if it's not going to be port 80. After this you then you set up your virtual host something like the following substituting the <> for what ever needs to go there
DocumentRoot <directory in file system where site is>
ServerName <main domain ie example.com>
ServerAlias <alternative domains ie www.example.com example2.com>
if you want it to listen on a specific IP change the *:80 to the ip:80 ie 127.0.0.1:80
Last edited by r3sistance; 10-09-2009 at 03:10 AM.
If the host uses a local-only IP (like 192.168.*.*), the server will be limited to intranet use -- I think this is what you want.
You can create as many such virtual servers as you like, each with a different access port. This method using different access ports is by far the simplest way to create virtual servers, which explains why it's used so often.
Even though both the VirtualHost containers are using the same IP address (NameBased VirtualHosting), Apache web server checks the Hostname/domain name in the HTTP header and shows the loads/parses the corresponding index page from the respective VirtualHost DocumentRoot.
You can check the following documentation page for better understanding and more information,
That's why I mentioned that darned line before, nothing more fun then having to hunt through documents just to find you need that line uncommented and active! Gotta love reading all the way through such a large file as the httpd.conf