Virtualmin is a powerful and flexible hosting control panel that integrates with webmin. We will be using it to provide the virtual hosting functions such as creation of domains, accounts and maintaining configurations on the system.
You need to start up services that are required to be able to configure virtualmin. Start the following services
# service named start # service spamassassin start # service spamass-milter start # service clamav-milter start # service postfix start # service dovecot start # service imapproxy start # service httpd start
Webmin needs to be able to communicate with mysql since we have set a password for mysql we need to set that up in webmin, go to servers → mysql and enter this information
You need to enable the features and plugins that we want to use. On login this is the screen that you will see.
Server template are used to customize the services and to create packages for different hosting account types.
You can make changes to the way apache virtual hosts are created by editing this template, The defaults however will do for purposes of this howto.
This template is used to configure various server limits such as number of mailboxes,aliases,databases,virtual servers and other options like bandwidth limits, admin abilities. For this howto we will use the default values.
This template allows you to set a skel directory to hold setting for new users for this howto we will use the defaults
This template lets you set the quota for the virtual server and the admin user for this howto we will use the default quota 1GB.
This template sets various mail related options, we will modify the email message sent on server creation to have to content below
The following virtual server has been set up successfully :
Domain name: ${DOM}
Hosting server: ${HOSTNAME}
${IF-VIRT}
Virtual IP address: ${IP}
${ENDIF-VIRT}
Administration login: ${USER}
Administration password: ${PASS}
${IF-WEBMIN}
Administration URL: ${WEBMIN_PROTO}://www.${DOM}:${WEBMIN_PORT}/
${ENDIF-WEBMIN}
${IF-WEB}
Website: http://www.${DOM}/
${IF-WEBALIZER}
Webalizer log reporting: Enabled
${ELSE-WEBALIZER}
Webalizer log reporting: Disabled
${ENDIF-WEBALIZER}
${ENDIF-WEB}
${IF-MAIL}
Email domain: ${DOM}
SMTP server: mail.${DOM}
POP3 server: mail.${DOM}
Webmail: webmail.${DOM}
${ENDIF-MAIL}
${IF-DNS}
DNS domain: ${DOM}
Nameserver: ${HOSTNAME}
${ENDIF-DNS}
${IF-MYSQL}
MySQL database: ${DB}
MySQL login: ${MYSQL_USER}
MySQL password: ${PASS}
${ENDIF-MYSQL}
${IF-POSTGRES}
PostgreSQL database: ${DB}
PostgreSQL login: ${USER}
PostgreSQL password: ${PASS}
${ENDIF-POSTGRES}
We will leave the other options as the defaults.
This template is used to customize the zones that will be created by virtualmin. The changes to be made are adding a spf record, add the following records to auto generated text box (replace ns1.home.topdog-software.com. with your slave server)
@ IN NS ns1.home.topdog-software.com. ;slave admin IN A 192.168.1.6 ;virtualmin webmail IN A 192.168.1.5 ;webmail
In the directives text box add the following with the ip address of your slave server such that the slave is allowed to do zone transfers.
allow-transfer { 192.168.1.2; };
Finally we have a working virtual server system, lets create our first virtual server. Go to servers → virtualmin virtual servers and click add new virtual server, owned by new user.
Fill in the require fields and click create.
Add a mail user to the domain. click on the domain name, then click edit mail and FTP users, then add user and fill in the information.
Well thats it folks you can now test this virtual server.