The Title Virtual Host, Multiple Websites, Ubuntu 13.10 and Rackspace Cloud Server is not good but actually it explain the things we want to say. It is very common situation that, one has 2-3 serious busy websites; may be blogs or forums and other 17-18 domains which are rarely updated. The rest 17-18 do not deserve 17-18 1 GB server for each of them. To host multiple servers on Single Apache Webserver, we use Virtual Host, which is not really very difficult if you get used with.
Virtual Host, Ubuntu 13.10 and Rackspace Cloud Server : Previous Guides are the Building Blocks
By now, we know How To Install WordPress on Ubuntu 13.10 on Rackspace Cloud Server and create image to spin up a new server with the existing setup with all the required softwares. We also know about Ubuntu 13.10, Apache 2.4.x and Apache virtual host has difference with Previous Ubuntu versions and Apache Versions. So, we know everything but just we need to arrange our knowledge a bit, so that we can actually server the websites properly.
Virtual Host, Ubuntu 13.10 and Rackspace Cloud Server : Multiple Server Opens Up Possibilities
17-18 websites on a 1 GB server, will be too difficult to manage. May be you can split them up. The Planning is important. If you use 2-3 Servers, you actually can use MySQL of another server – like as if in a daisy chain. It will, make WordPress scalable to some extent. This is a point which you can think about. But, in that case, Ports should be properly managed with a Firewall. Also, you can do, what previously known as WordPress MU setup. Since WordPress 3.0, we have the ability to create a network of sites by using the multisite feature. This is the official guide for such setup :
---
1 | http://codex.wordpress.org/Create_A_Network |
Basically, with our installed webmin software, it is easy to server multiple domains, tutorials are linked at the beginning of this article and here is how to use webmin is explained by Rackspace :
1 | http://www.rackspace.com/knowledge_center/article/ubuntu-intrepid-webmin-adding-an-apache-virtual-host |
However, I personally dislike using webmin to create virtual host. Because; it is very easy from command line to create virtual host for new domains and can give granular control of understanding what we are doing. The first step to create a virtual host is to create the directories where we will keep the new websites’ information :
1 | sudo mkdir -p /var/www/example.com/public_html |
Note that, we are creating a public_html folder here, www is not barely exposing files to public. We just need to copy :
1 | sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/example.com.conf |
But, example.com.conf
is not rightly telling the domain name and other details, we should edit it :
1 | sudo nano example.com.conf |
All permission related works, everything remaining the same like we did for our one server setup, except, we need to :
1 | sudo a2ensite example.com |
and restart Apache. There is, basically no big extra technological or coding knowhow except these few commands. It is not our work to understand, how example.com and example.org, being on the same server is rightly getting the folder. That is work of DNS, we need not to know so much; our only work is to properly set the path.
Virtual Host can create initial trouble, search in StackExchange, SuperUser like websites to solve any issue.