Table of Contents
Domain aliases
Alias virtual servers (domain aliases) are perfect if you have two or more domains and need them to mirror each other (serve the same web contents, provide the same mail addresses etc.). To create an alias, first start with the master virtual server that the others will mirror, and make sure it works as you need it to. Then, to create an alias do the following:
Make sure you have enabled the web virtual server, otherwise you will not be able to serve websites from your domain. You can enable the web virtual server from Virtualmin by doing the following:
- Sign in to Virtualmin (
https://xxxxxxxx.fb.joyent.us). - Select the virtual server from the drop-down in the left-hand navigation (your main virtual server should be already selected when you first login to Virtualmin).
- Click Edit Virtual Server in the left-hand navigation.
- Click Enabled features
- Select Web virtual server enabled? and click Save Virtual Server
From Virtualmin
- Sign in to Virtualmin (
https://xxxxxxxx.fb.joyent.us). - Select a domain from the drop-down in the left-hand navigation (your main domain should be already selected when you first login to Virtualmin). The domain you select will be the one that you'll be creating an alias to.
- From the left-hand navigation, click Create Virtual Server.
- From the top of the Create Virtual Sub-Server page, click Alias of …
- For Domain name field, enter the name for your alias (omit any
http://...orwww.parts) and a brief description in the Description field. - Click Enabled features. Only some features will appear in the list here, such as those that the parent virtual server has enabled.
- The Accept mail for domain option still controls whether any mail will be accepted for this alias server (though it would in fact be passed right to the mailboxes defined under the parent virtual servers). The same applies for the website options etc.
- Finally, Click Create Server.
From SSH
To add example.com as an alias to your existing domain xxxxxxxx do the following:
- SSH onto your Accelerator
SSH admin@xxxxxxxx.fb.joyent.us
- Edit the configuration file
nano /opt/local/etc/httpd/virtualhosts/xxxxxxxx.conf
- add the following code after the existing
ServerAliaslineServerAlias www.example.com example.com