Professional Documents
Culture Documents
Serverwise:
the SSD Nodes blog
Webmin is a lightweight control panel to manage Linux machines with ease. With its web interface, you can create user
accounts, set up cron jobs, check disk quotas, and much more. Better yet, installing Webmin is fairly straightforward, and the
service is completely free.
All in all, Webmin is handy for Linux/VPS beginners who are not comfortable with the Linux command line.
In this article, we’ll set up Webmin on Ubuntu 18.04. These instructions should also work on Ubuntu 16.04.
Now in LA!
Get THE BEST DEALS IN CLOUD HOSTING from Los Angeles!
Grab a huge 32GB RAM & 320GB of SSD storage for just $109/year!
Score a 24GB Performance VPS with 240GB of NVMe storage for just $99/year for a limited time!
Set the hostname of the system by editing the file /etc/hostname , replacing YOUR-HOSTNAME with your hostname of choice:
$ vi /etc/hostname
YOUR-HOSTNAME
Next, edit the file /etc/hosts and add the following line at the end: The format is YOUR-IP YOUR-HOSTNAME.YOUR-DOMAIN YOUR-HOSTNAME
.
$ sudo vi /etc/hosts
YOUR-IP YOUR-HOSTNAME.YOUR-DOMAIN YOUR-HOSTNAME
Run the command below to restart hostname service and network manager to apply changes:
Now check the hostname and FQDN of your VPS. They should be updated based on what you just specified.
$ hostname
panel
$ hostname -f
panel.YOURDOMAIN
$ sudo vi /etc/apt/sources.list
....
....
deb http://download.webmin.com/download/repository sarge contrib
Add Webmin’s PGP key, so your system trusts the new repository we just added.
You can now visit the Webmin interface via https://YOUR-HOSTNAME.YOUR-DOMAIN:10000 . Webmin warns you about an untrusted
certificate—that’s fine, just add it to the exception list and login with the user you use to connect to the server via SSH.
$ cd /usr/local
$ git clone https://github.com/letsencrypt/letsencrypt
Navigate to Webmin > Webmin Configuration in the Webmin dashboard and click on the box with a gear icon on the top-left corner
called “Module Config.” Enter the full path (/usr/local/letsencrypt/letsencrypt-auto) of the Let’s Encrypt binary and hit the save
button.
Go to Webmin > Webmin Configuration > SSL Encryption and select the Let’s Encrypt tab. Enter your domain name in
hostname for certificates box . Choose Other directory for Website root directory for validation file option and enter
/var/www/html . You can choose another directory in place of /var/www/html , but make sure the Let’s Encrypt ACME challenge
can access that directory. Keep the rest of the options in their default state.
Click Request Certificate . On successful fetching of the certificate, you get the following message:
Now that the Webmin is installed and encrypted with SSL, you can start exploring its many features and capabilities. An
excellent place to start it upgrading your system’s packages. All packages available for update are listed on the left-hand side
under the Package Updates section.
What’s next? It all depends on your needs and applications, but you can go ahead and experiment with creating users/groups,
changing passwords, scheduling cron jobs, creating virtual hosts with Apache, manage firewalls, and more. With Webmin, you
can do all this with a GUI rather than typing the commands—a nice bonus for those who don’t want to spend much time on a
terminal.
You can also check out Webmin’s official wiki to explore Webmin’s features even further.
For this, we need to enable three Apache modules: proxy and proxy_http and ssl . Enable these modules one by one by
issuing following commands from the terminal and restart apache.
Next, create the Apache virtual host for our webmin installation with the following configuration:
$ vi /etc/apache2/sites-available/webmin.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName YOUR-HOSTNAME.YOUR-DOMAIN
ServerAlias YOUR-HOSTNAME.YOUR-DOMAIN
LogLevel debug
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/YOUR-HOSTNAME.YOUR-DOMAIN/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/YOUR-HOSTNAME.YOUR-DOMAIN/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/YOUR-HOSTNAME.YOUR-DOMAIN/chain.pem
ProxyRequests On
ProxyVia On
SSLProxyEngine On
ProxyPass / https://YOUR-HOSTNAME.YOUR-DOMAIN:10000/
ProxyPassReverse / https://YOUR-HOSTNAME.YOUR-DOMAIN:10000/
</VirtualHost>
</IfModule>
<VirtualHost *:80>
ServerName YOUR-HOSTNAME.YOUR-DOMAIN
Redirect permanent / https://YOUR-HOSTNAME.YOUR-DOMAIN/
</VirtualHost>
The ProxyPass directive allows Apache to pass requests for YOUR-HOSTNAME.YOUR-DOMAIN to the Webmin server, which is running in
the port 10000, and the ProxyPassReverse directive ensures internal links generated from the Webmin server pass through
apache.
Enable the virtual host by creating a symbolic link of the above file inside /etc/apache2/sites-enabled directory. You can also
activate the site using a2ensite command.
$ cd /etc/apache2/sites-enabled
$ sudo ln -s ../sites-available/webmin.conf .
$ sudo apache2ctl -t
OK
$ sudo systemctl restart apache2
$ vi /etc/webmin/config
....
....
referer=YOUR-HOSTNAME.YOUR-DOMAIN
At this point, you can access your Webmin server using the Apache proxy by navigating to https://YOUR-HOSTNAME.YOUR-DOMAIN in
your browser.
Share this post:
A note about tutorials: We encourage our users to try out tutorials, but they
aren't fully supported by our team—we can't always provide support when
things go wrong. Be sure to check which OS and version it was tested with
before you proceed.
If you want a fully managed experience, with dedicated support for any
application you might want to run, contact us for more information.
How to install Slack alternative Rocket.Chat The 7 best FREE cPanel alternatives (2020
on your server edition)
Features Tutorials
Self-Hosting Development
Terms of Service
Contact us
Legal
Strasmore
DMCA
Twitter Facebook
© 2011-2020 Strasmore, Inc. All rights reserved. Strasmore and SSD Nodes are registered trademarks of Strasmore, Inc.