Domains
Typically, you'll want to use your shared hosting account to serve websites and handle mail with your domain(s). A domain is typically understood as a hostname of two parts (e.g. mydomain.com), sometimes of three parts (e.g. mycompany.co.uk) - compared to subdomains which usually introduce an additional minor part (e.g. blog.mydomain.com).
- Sign in to Virtualmin (see Account logins and important URLs).
- Select a 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 Enable PowerDNS domain?
- Click Save Virtual Server
Adding a domain
First, you should own a domain - that is, have it registered with a domain registrar. Joyent does not provide a domain registrar service, so you'll need to register a domain first with a 3rd party provider. Once you have a registered domain, do the following:
- Sign in to Virtualmin (see Account logins and important URLs).
- From the left-hand navigation, click Create Virtual Server.
- In the Domain name field, enter the desired name for your new domain (do not enter
http://...
or evenwww.
) and a brief description in the Description field. - A mail user suffix and database prefix will be automatically chosen, but you can customize them under “Advanced Options” if you want (see note below). The mail user suffix can be changed until a user is created.
- Click Enabled features. From here you can decide whether you want to enable email, MySQL, WebDAV, Subversion etc. for your domain. Most of the features are disabled by default (including the web server!), so be sure to check over the options and enable what you need. It is a good practice to leave off things you don't currently need; they can always be turned on later. Since you're adding a domain, you'll most likely want to enable Web virtual server enabled? to make your website accessible.
- Finally, click Create Server to create your domain.
With administration username foo
for domain bar.com
your main domain name’s default prefixes will be:
- Mail user: “
user name-admin username
” eg for a user calledbillbarnicle
the resulting email login will bebillbarnicle-foo
(note that this only affects the POP/Usermin login name, the email address will bebillbarnicle@bar.com
). The admin user’s POP/Usermin login will just befoo
(notfoo-foo
). - Database: “
admin username_database name
” eg for a database calledwombat
the resulting database name will befoo_wombat
.
When you create a virtual server (a subserver), eg for the domain baz.com
your sub-server’s default prefixes will be:
- Mail user: “
user name-subserver name
” eg for a user calledsamsawnoff
the resulting email login will besamsawnoff-baz
. Specify a new prefix as it is, egqux
would give you the email loginsamsawnoff-qux
. - Database: “
admin username_subserver name_database name
” eg for a database calledpossum
the resulting database name will befoo_baz_possum
. To specify a new prefix include the admin username and trailing underscore, egfoo_qux_
, which would give youfoo_qux_possum
.
Renaming a domain
- Sign in to Virtualmin (see Account logins and important URLs).
- 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 renaming.
- Click Server Configuration and click Change Domain Name.
- In the New domain name field, enter the new name for your domain.
- If you'd like to keep the name of the home directory for this domain, select Leave as /users/home/… for Change home directory, but usually you want the name change as well (this will have no effect on primary virtual servers).
- If you'd like to keep the names of your mail/SFTP users, select No for Rename mail / FTP users too?.
- Remember, any users you create for a domain will have a username based on the domain name. So, if the user's name is joe and the domain name is example.com, Joe's login would be joe-example.
- Click Rename Now.
Deleting a domain
- Sign in to Virtualmin (see Account logins and important URLs).
- 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 renaming.
- Click Disable and Delete and click Delete Virtual Server.
- Click Yes, Delete It to delete the domain.