vHosting

By Joe Gardiner Wednesday, 9th June 2010

vHosting allows you to host multiple domains on the one vCluster. This is useful not only for hosting lots of sites without needing numerous vCluster accounts, but also to use one domain as a test environment, before pushing any changes to the live domain. In order to follow this guide you will need to have setup FileZilla to access your vCluster. You can read the guide here.

Once you have connected...

Connect to your vCluster using FileZilla and have a look at the directory listing in the right panel of the user interface. Inside your www web folder will be a folder named vhosts, this is where you create your sub-domain folders. However, if this folder does not exist complete the following steps. If it does exist you can skip this section.

Creating vhosts folder

Take a look at the contents of your main vCluster directory. My vCluster directory name is fubra-joegardiner, inside you will be able to see your awsts, etc, log, http, and https folders. Right click on your main vCluster folder and select Create Directory In the create directory dialogue box, enter the folder name vhosts, and click ok. You'll now have a vhosts folder on your vCluster.
Open up your vhosts folder, and have a look inside, the folder should be empty. Inside the vhosts folder we're going to create a folder for our subdomain files. Let's create a subdomain for my domain name joegardiner.co.uk Right click on the vhosts folder and and select create directory. In the create directory dialogue enter the name for the sub-domain. The name needs to be exactly the same as the domain name you wish to point to this vhost e.g.:

joegardiner.co.uk

In my case the sub domain folder will be named:

joegardiner.co.uk

This newly created directories full directory name will be:

/sites/fubra-joegardiner/vhosts/joegardiner.co.uk

This is very important: inside our newly created sub-domain folder you need to add an http folder to upload your wordpress or web site files to. Using the same method, create this directory now.


.craccess

We are almost finished, we just need to add a file to http folder that allows dynamic content to be served correctly. This file is vitally important so make sure you complete this step. There is a guide explaining the function of this file and how to create it that you can read here. The .craccess file already exists in the http folder in your vCluster root directory. Before you go looking for it you need to enable viewing hidden files in FileZilla. Open up FileZilla and have a look for "Server".

Click the "Server" option from the menu bar and select "Force showing hidden files". This will display hidden configuration files in all folders you view through FileZilla.

Now that hidden files are viewable, open the http directory in your vCluster root directory (not the sub-domain folder you just created), and you locate the file called .craccess.

/sites/fubra-joegardiner/http

Make a copy of this file and transfer the copy to the http folder in the sub-domain directory.

/sites/fubra-joegardiner/vhosts/joegardiner.co.uk/http

As you can see in the following picture, the .cracess file is now displayed in my wordpress test install folder.

Finally...

Any files placed in the http folder in your subdomain will now be accessible by site visitors. To view the subdomain in your browser, simply enter the sub-domain into your address bar, for example: wptest.joegardiner.fubra.vc.catn.com. Now a domain has been set up for a WordPress install have a look at this guide for the WordPress installation procedure. This process can repeated to create as many sub-domains on your vCluster as required.

Posted in Guides, vHosting | 3 Comments » twitter-follow facebook-follow rss-follow

  • Jon Law says:

    Joe

    IN this process you explain very well to the point where we copy over the .craccess file to the newly created subdomain http folder. Great!

    Then the next thing you show is the pciture of the .craccess file in the new http folder, which is very nice but you don’t say where the wordpress files come from?

    Do I install them again? I thought the whole idea was that for multi-sites you only need to install WP once.

    If not can I just upload them for a particular site from the previous host? That would mean that the theme options would be saved.

  • Jon Law says:

    ok so it looks like i need to follow the same procedure that I performed in the first instance, I’ve just seen the link in Finally section

    The picture of the explorer files is confusing

  • Joe Gardiner says:

    Hi Jon,

    To setup multiple domains on a single WordPress install please follow this guide: http://catn.com/2010/08/09/enabling-wordpress-3-0-multi-site/.

    This guide is for sub domains on your vCluster and is not necessarily for WordPress. Following these instructions you could install numerous applications like Joomla and Drupal etc on a single vCluster by creating multiple domains, one for each application. I will update the image to remove any confusion.

    Wikipedia explains vHosting well: http://en.wikipedia.org/wiki/Virtual_hosting

Leave a Reply

Your email address will not be published. Required fields are marked *