Building A Classroom Teacher's Site with Joomla part 2b - adding a virtual host to Apache with webmin
We now have everything set up for Lisa's DNS service. Now that we have her domain and www host pointed to 205.167.0.101, let's add that IP to our server first. We are using Ubuntu server 9.10, and our desktop environment is GNOME. The most recent releases of these have a very handy little tool that you may not notice, the Network Manager and it's in the top-right of your default GNOME desktop:
So using Network Manager, we very simply and easily add another IP number to our server's interface, right click on the icon that looks like two plugs connected, and choose edit connections:
Click on the interface, and click edit, then click on IPv4 Settings, and choose Add:
Very simple! Now let's take a look on the command line:
root@cloud1:/home/chris# ping www.lisabyrdsclass.com
PING lisabyrdsclass.com (205.167.0.101) 56(84) bytes of data.
64 bytes from dialup12.max1.cyberstation.net (205.167.0.101): icmp_seq=1 ttl=64 time=0.015 ms
64 bytes from dialup12.max1.cyberstation.net (205.167.0.101): icmp_seq=2 ttl=64 time=0.017 ms
Uh-Oh! Reverse DNS doesn't match. That's the part of DNS that maps not from name to number, but from number to name. Our IP had a previous life as someone's ISDN dialup network! Wow-that was a while back!! That's ok, we simply have an old entry in the reverse DNS for that IP number, we will simply replace our old Ascend MAX dialup name with lisabyrdsclass.com, using the same methods and tools we used in the previous post, and propagate it to the secondary DNS as well. OK it's done, now our IP setup is finished and working:
%ping www.lisabyrdsclass.com
PING lisabyrdsclass.com (205.167.0.101): 56 data bytes
64 bytes from 205.167.0.101: icmp_seq=0 ttl=64 time=0.318 ms
64 bytes from 205.167.0.101: icmp_seq=1 ttl=64 time=0.180 ms
OK very good, now let's add her domain and ip number as a virtual host in our webserver, which is Apache v. 2.2.12 - first we will need to have a directory/folder on our server where we will keep Lisa's website. What we'll do here is add her as a user on our system, then put a folder in her public_html directory, so she has direct control over the whole site. OK, we've added her as a user, using our Ubuntu/Gnome system administration tools (available under the system menu). We created a new folder under her public_html directory, and we also made one additional change, we made her public_html directory and the new folder (lisabyrdsclass.com) owned and writeable by the www-data group, so that the webserver user can read and write to the directory with no problem.
Now we will go into webmin and add a new virtual host:
Note that we left the port as "any" - this is to facilitate us later adding SSL security, which runs on port 443, to the website. Since there is only one website at this IP number, we can receive communications on both the standard HTTP port 80, and HTTPS on port 443 to this same site, with no problem. Another good reason to use a separate IP - if you have them ;-)
OK let's add it ... now we will look in it's config and edit anything we need to edit in there. OK we are going to set *most* of the options to "yes" - for security reasons I won't go much further into that. I'm going to set myself as the email contact for the domain (for now) and add lookup hostnames to the logs for the domain (making logs easy to read rather than just IP numbers), later we will add "fancy logging" to this domain, including the "referer" log, which I like to analyze on my sites, but for now, we will leave it defaulted, we want to get this thing going!
OK! Well let's put a very simple file in the directory and see if we see it at http://www.lisabyrdsclass.com !
OK!! Well now how do you like them apples? We've now got our DNS, IP number, routing, and Virtual Host up and running for Lisa's website. Other than the email configuration for the domain, which really can wait, since we don't anticipate users using this domain for email, we are to the point of installing joomla. Yay! We're at least 1/3 of the way there, and most of the hard part is done. Look for Part 3 to come next.
Last updated (Thursday, 28 January 2010 14:23)









