Search code examples
apachenginxipwebminvirtualmin

How to configure Virtualmin to be accessed using Domain name after installation


I installed Virtualmin on my server at a time i wasn't having a domain name. But now i do, how do i configure Virtualmin to be accessed through this domain name that is managed from another server.

Can I simply use a reverse proxy to map the ip to the new domain name in Apache?


Solution

    1. You will need to point your domain to your Virtualmin server and setup apache to act as a reverse proxy for the domain

      <VirtualHost *:80>
          ProxyPreserveHost On
          ProxyPass / http://127.0.0.1:10000/
          ProxyPassReverse / http:127.0.0.1:10000
      
          ServerName vps.example.com
      </VirtualHost>
      
    2. By default Virtualmin bind to your server's IP and port 10000. You can change that to bind to loopback by editing the /etc/webmin/miniserv.conf and add bind=127.0.0.1 to it
    3. Edit /etc/webmin/config add referers=vps.example.com to allow Virtualmin to serve the page otherwise it will give you an error
    4. By default Virtualmin allows access to the root user of your system. To add other users edit /etc/webmin/miniserv.users and add the new user.