Setting up Webmin and Virtualmin for web hosting (on odroid or any ARM platform) using Debian

Printer-friendly versionPDF version

If your hosting your own website than the combination of webmin and virtualmin is a boon. Even for development purposes its great. The virtualmin install script for a freshly installed "supported" platform runs flawlessy. But for every other system you have to do the drill manually.

So in this article I'll show you how I setup my LAMP server. Mine is an ARM soc (u2 from odroid). So I can't for e.g. run the virtualmin 'GPL' install script as I mentioned above. But I seem to get a functional setup using the steps below. This is done more less according to this excellent and popular guide from "patrickjwaters". Use the pictorial guide from his blog and combined with some of my tips below and you should be good to go even on arm.

Execute the following lines in your shell to add webmin repository, the key and finally install webmin. This is a shorter version than the "patrickjwaters". Just run the lines below and your all good to go. No need to open any editors or anything :

#Webmin
wget -q -O - http://www.webmin.com/jcameron-key.asc | apt-key add - 
sh -c 'echo "deb http://download.webmin.com/download/repository sarge contrib" >> /etc/apt/sources.list.d/webmin.list'
sh -c 'echo "deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib" >> /etc/apt/sources.list.d/webmin.list' 
apt-get update 
apt-get install webmin

Next we are going to install Virtualmin. This is done by going to the webmin url https://localhost:10000. Login using user “root” and your system root password.

From this this url you can than install the wbm formats using the “From ftp or http URL” option found under the “Webmin Modules” under install tab. This url currently lists the latest versions. Aftet this step also install the modules "virtualmin server skin" and "virtualmin awstats".

Than I installed more or less everything that virtualmin uses or needs ( extracted from the official gpl virtualmin install script) as below:

apt-get --force-yes install postfix postfix-pcre webmin ruby libapache2-mod-ruby libxml-simple-perl libcrypt-ssleay-perl unzip zip libfcgi-dev bind9 spamassassin spamc procmail  libnet-ssleay-perl libpg-perl libdbd-pg-perl libdbd-mysql-perl quota iptables openssl python mailman ruby irb rdoc ri mysql-server mysql-client mysql-common postgresql postgresql-client awstats webalizer dovecot-common dovecot-imapd dovecot-pop3d proftpd libcrypt-ssleay-perl awstats clamav-base clamav-daemon clamav clamav-freshclam clamav-docs clamav-testfiles libapache2-mod-fcgid apache2-suexec-custom  apache2 apache2-doc libapache2-svn libsasl2-2 libsasl2-modules sasl2-bin php-pear php5 php5-cgi libgd2-xpm libapache2-mod-php5 php5-mysql

What I left out was "procman-wrapper" and "scponly" which do not have debian arm ports. ( If you are using my odroid u2 image for hosting, during finalization of the image I did however remove some un-necessary packages like usermin, dovecot, postgresql and proftpd. Anyways what you get shown as installed is what you have finally in the image).

As a last step the "apache2-suexec-custom" is configured. For the impatient here is the command line version

apt-get install apache2-suexec-custom
cd /etc/apache2/suexec
sed 's|/var/www|/home|' www-data-new
rm www-data
mv www-data-new www-data
apache2ctl restart

If you prefer to do it manually you can edit the below file to replace "/var/www" by "home".

nano etc/apache2/suexec/www-data

Now you have a server with multi-site configuration (although I haven't tested this part, I am hosting only a single domain currently). Now just use Virtualmin to create your hosted domains.

Remember to provide webmin with the mysql user root password when you first login before creating any domains.

 

Top level category:

Comments

Hi Ahsan, Good stuff, i did some similar on a raspberry pi, using this https://geekanddummy.com/how-to-raspberry-pi-tutorial-part-3-web-file-hosting-with-webmin-virtualmin/ Both your and that howtoo are a bit dated but do still work. What I noticed is this. As there is no arm distro on virtualmin, virtualmin never gets updates. Now I wonder, can I update AND save my settings by installing a more recent WBM over the old one? Tx

Hi Pieter, Sorry did not update virtualmin as of yet. So can't say what happens to the settings. On a Pi it should be no problems right, Save your image and try it out and see what happens. Regards Thanks.

Add new comment