I’m getting too good at this, to help my boss out of a jam, I tossed up 4 new websites on my cloud server.
It was pretty simple and straight forward, and a major case for doing your own hosting. I shudder to think how tough it would be to point these new domains at a shared hosting site, without buying four hosting accounts. It took me about 2 hours to do, but only because I had forgotten much of what I did to get this site, hamopensouce.com and ronaldcbarnes.com working on my host. Also I don’t have any tidy scripts or templates, everything was edited by hand.
I only need to serve up about 5 static pages per site, very low traffic, I probably wont even notice the hits. A homepage, privacy statement, contact us page, and little else. This is what it took:
The domains www.wsah-tv.com, www.wmfp-tv.com, www.khiz-tv.com and www.kcns-tv.com,were all available for about $11 / year. I snatched them up through my registrar, GoDaddy.com
I pointed my new domains at my name server with the tools provided by GoDaddy.
I created the necessary A, CNAME and MX records on my DNS server at my host provider. I made CNAME entries for www.domain.tld, and mail.domain.tld. I don’t believe we’ll be hosting a SMTP or POP server, but it’s there just in case and may be needed by the sendmail daemon.
Off my home directory is a directory where I keep all my websites. From there, a standard web directory structure of “public”, “private”, “log”, “cgi-bin” and “backup” were created.
The directory and file permissions were set to 755 and owner was set to also include www-data. (See your Linux documentation on how to do this, your mileage will vary from version to version).
A VHOSTS file was created in the /etc/apache2/sites-available directory which looks something like this (sensitive parts redacted). The alias was used on this site for its wiki, and the FollowSymLinks reference was used as part of the WordPress permalinks and has since been remarked out. They are there in case they are needed in the future.
# Place any notes or comments you have here
# It will make any customisation easier to understand in the weeks to come
# domain: wsah-tv.com
# public: /home/*****/*****/wsah-tv.com/public/
# Admin email, Server Name (domain name) and any aliases
# Index file and Document Root (where the public files are located)
DirectoryIndex index.php index.html
# <Directory /home/*****/*****/wsah-tv.com/public>
# Options Indexes FollowSymLinks
AddHandler cgi-script cgi pl
# Custom log file locations
CustomLog /home/*****/*****/wsah-tv.com/log/access.log combined
#Alias /wiki /home/*****/*****/wsah-tv.com/public/w/index.php
The script, a2ensite was run on each domain. It pretty much just sets up a symbolic link between /etc/apache2/sites-available and /etc/apache2/sites-enabled.
I found a suitable template on the Open Source Web Directory, a repository of HTML templates released to the open source community. The index.html, css and images folders were uploaded via Filezilla FTP (actually FSTP, SSH file transfer, I never bothered to set up FTP).
Thats it, after the DNS records had enough time to propagate through the internet, I had 4 new sites ready to go. Content will be completed tomorrow, but the sites are up and the templates are in place.
FOR THE FUTURE:
I’d like to split these four domains out of my personal GoDaddy account and place them into something I can provide access to. The corporate IT guy, my boss, my replacement should something happen to me, etc.
Also KHIZ has a nice shared hosting account already paid for by the company. I am going to investigate pointing these domains at that. If this proves problematic (I really cannot justify buying 4 separate hosting accounts for what we will be serving) I will sell the concept of the cloud server to the bosses.