Friday, February 03, 2012

Rackspace Step 6: Configuring Apache

I'm going to be hosting multiple domains on this single cloud server and through time I am hoping to have a fair bit of traffic on these sites so I'm going to need to deepen my understanding of the Apache Server. Along with the recently purchased book on postfix, I also purchased the book Apache Cookbook, 2nd Ed. By Ken Coar and Rich Bowen.

After getting everything done DNS and hosting wise to point your domain names at your rackspace server then you can start to set up virtual hosting. The process of setting up multiple virtual hosts is very straight forward. It does take a little reading to get your head into it and I suggest a few searches using the terms "virtual hosting apache ubuntu". It is also a good idea to include your OS in the search terms, for each Linux OS has different idiosyncrasies. And in the end I found the rackspace knowledge center post to be the best.

The last step of configuring the apache server to host multiple sites under one ip address is to run "sudo /etc/init.d/apache2 restart". This command restarts apache and provides you errors and warnings if your configuration is incorrect. I would strongly suggest these get cleaned away before you consider yourself finished. Most often the warnings don't stop apache from successfully running your sites. But they could be an indication of a performance issue. From a security, stability and performance perspective it is good to get all errors and warnings cleared away. And searches on the warnings in your favorite search engine should quickly find a solution.