Configure Virtualmin

Introduction

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.

Start services

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

Initial settings

Mysql

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

Configure Features

You need to enable the features and plugins that we want to use. On login this is the screen that you will see.

  • Enable the following features and save
    • Home directory
    • Administration user
    • Mail for domain
    • BIND DNS domain
    • Apache website
    • Webalizer reporting
    • Log file rotation
    • Mysql database
    • Webmin user

Configure server templates

Server template are used to customize the services and to create packages for different hosting account types.

Apache template

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.

Domain owner template

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.

Home directory template

This template allows you to set a skel directory to hold setting for new users for this howto we will use the defaults

Administration user

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.

Mail for domain template

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.

BIND DNS domain template

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; };

Mysql Database template

Contains options on creation of databases by virtualmin, for the howto we will use the defaults.

Webmin login template

Contains option on creation of new users by virtualmin, for the howto we will use the defaults

Create virtual server

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.

centos_5_virtual_hosting_virtualmin_setup.txt · Last modified: 2008/02/09 17:46 by topdog
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki