Moved to new server | 5 Comments
Posted in Muffin Research Labs on 18th November 2005, 5:01 pm by Stuart
Last night I moved muffinresearch.co.uk over to a new webserver hosted by Amenworld. Amenworld are currently unbeatable on price/value for dedicated servers and I’ve already used their services before for a client so I wouldn’t hesitate in recommending them.
To make the move without downtime, I copied the files from my old server to the new one and added the ip address of my new server to my hosts file for the domain muffinresearch. This meant I could point my browser at www.muffinresearch.co.uk and be looking at the new server. This works because every operating system checks it’s hosts file before querying a DNS server.
The transition to the new box went fairly smoothly once I’d got to grips with Plesk’s vhost.conf set-up. The vhost.conf file (/home/httpd/vhosts/<domain-name>/conf/vhost.conf) is a temporary location for apache directives that are written to the main configuration file (/home/httpd/vhosts/<domain-name>/conf/httpd.include) when you issue an update command.
If the vhost.conf doesn’t already exist you will need to create it first as root(touch /home/httpd/vhosts/<domain-name>/conf/vhost.conf). Next you can add your apache directives. Once you have saved the file you will need to merge the changes to the main configuration with this command:
/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=<domain_name>
To complete those changes you also need to restart apache. I found it was preferable to do this from the command-line rather than via Plesk so that any error messages are visible.
service httpd restart
Should you need to create a domain alias to an existing domain, vhost.conf makes this very easy. Simply add he following to your vhost.conf:
ServerAlias alias1.domain.tld
Remember, every time you make a change to vhost.conf you need to merge the changes and restart apache.
Following the move there may be the odd screw-up so if you spot anything odd please let me know via the contact form.
