I have multiple Websites that I was running on shared Windows Web hosting. Due to various reasons, I migrated from DNN to WordPress. Instead of choosing shared Web hosting, I chose Digital Ocean for hosting multiple Websites on WordPress.
I had little experience with Linux and due to time constraint, I do not want to learn Linux and configuration for various software. I was looking for an open source control panel that would do all the heavy lifting for me. After researching, I found Webmin that satisfies all my needs for Web hosting.
What do we need for Web hosting?
We need following components for a typical Web hosting
- Web Server (Apache or Nginx)
- Database Server (MySQL)
- Email (Dovecot, Postfix)
- Webmail Client
- SSL Certificate (Let’s Encrypt)
Recommended configuration for hosting multiple Websites
I am hosting 4 WordPress websites. Here are various settings/programs I found is good enough for any person without involving much more complexity.
Web server – use Apache
Even though Nginx is powerful and lean Web Server, due to complexity, I opted for Apache. Also WordPress works extremely well with Apache and requires hack with Nginx so I opted for simplicity and chose Apache. (You may start thinking about using Nginx when your Website gets 100 visitors every second (6000 visitors per minute, 360K visitors per hour).
Web server name – FQDN
When you are hosting multiple Websites, you need to name your server and give Fully Qualified Domain Name (FQDN). This is needed in order to get your email service up and running. I recommend naming your server as webX.yourdomainname.com. Here X represents number and “yourdomainname” represents your website name. Instead of “webX”, you may choose “serverX”, “machineX”, “dropletX” or any other naming convention. Do not use the subdomain name that you want to use for some other purpose. Do not use bare domain name unless it is a spare name.
Webmin DNS service – disable
When you install Webmin, it installs DNS service by default. I suggest to your external DNS service and not use Webmin DNS service. Digital Ocean comes with DNS service so I suggest you to use that service. Generally your domain registrar also provides DNS service for free. Using DNS consumes CPU cycle. Also if your server is down, your DNS is also down.
Anti virus, spam filter – disable
Disable ClamAV anti-virus and Spam Assasin spam filter only if you know what you are opting for and the risk involved with it. I have disabled those because it consumes too much CPU and email count for my Website is very low.
FTP service – disable
I use Webmin Web interface in order to upload and download file. So I don’t need FTP service.
Recommended way to access MySQL and Email
Your server FQDN is webX.yourdomainname.com. Your Webmin runs on port 10000 so you can access it at webX.yourdomainname.com:10000. It is a good idea to create a virtual server “webX.yourdomainname.com” within Webmin to host your generic applications like phpmyadmin to access MySQL and RoundCube as Webmail client or any other generic application. Add phpmyadmin and RoundCube as a subfolder within this virtual server.
Recommended practice for Virtual Server
In Webmin, each website or subdomain you use is called Virtual Server. At the time of creating virtual server, use the following
- Under “New Virtual Server Details”
- Instead of relying on Webmin, explicitly set Administration username by selecting “custom username”.
- Fill all other details
- Under “Advanced Option”
- Set Contact Email address as “Other address…” and provide your email address. If you don’t, you may face an issue when generating SSL using Let’s Encrypt.
- Keep all other settings as it is or customize based on your need
- Under “Enable Features”
- Check “Create Webmin login” so that you can create username per each website or subdomain
- Select other features as needed. If you are planning to use RoundCube, it require MySQL.
Even if you have multiple Websites with different username, keep the password same for all the virtual servers. Even though it is not a best practice, it is a way to simplify your life. If you are using any password manager, you can choose different password for each username. Regardless, make sure you do not reuse root or sudo account password for virtual server password.