Building Your Own Web Server with Virtualmin/Webmin, MySQL, and Apache
Prerequisites for Setting Up a Fully Functional Web Server:
- Virtualmin: Your primary control panel for web server management.
- LAMP Stack (Apache, PHP, and MySQL): Essential components for serving websites and web applications.
- BIND (DNS Server): Facilitates domain name resolution.
- Postfix (Mail Server): Manages email services.
- Configuration of SPF and DKIM: Mitigates the risk of email delivery issues.
Important Note: Avoid following this tutorial on a live, production-ready Apache, MySQL, and PHP server, as it may result in data loss. Instead, use a newly created VPS server and transfer your data once you’ve completed all configuration steps.
Requirements
Requirements for Completing this Tutorial:
- A VPS Server with a Fresh Installation of Debian 9.
- A Fully Qualified Domain Name (FQDN) configured to point to your server.
- Two registered custom nameservers for use with Virtualmin setup.
Configuring the Hostname and FQDN for Your VPS Server
Begin by accessing your VPS server through SSH. In this tutorial, we will be using PuTTY. Run the following command:
apt-get update
Next, upgrade the essential packages by executing:
apt-get upgrade
After completing the upgrade, use the following command to check the current server hostname:
hostname-f
To modify your current hostname, edit the /etc/hostname
file using your preferred text editor. In this tutorial, we are using nano
.
nano /etc/hostname
Delete the existing hostname in the /etc/hostname
file and replace it with your preferred hostname: your_hostname
.