I have several virtual servers on a virtualmin box. All of them can access virtualmin administration using the port 10000. Ok.
I’ve installed a SSL certificate for one of the domain, and copied it to use with virtualmin administration. It works ok the domain I’ve installed the certificate, but the others give a message saying the certificate is for another domain.
The question is: is there a way to redirect all access on port 10000 to the domain I installed the certificate?
For example, I’ve installed the certificate on www.domain1.com . When someone accesses www.domain2.com:10000 virtualmin would redirect it to www.domain1.com:10000?
That way I would access virtualmin administration using only one domain, but with purchased certificate installed. I don’t give my customers access to Virtualmin, so I don’t have any problem using only one domain.
Is it possible?
i havent actually tried this for redirectin g vmin… but should work in theory. you would need to set this up for each vhost you have on the server. however can be added as a template under “server templates” and by editing “apache website”…that way any future vhosts get this rewrite rule automatically.
Virtualmin actually has native support for what you’re trying to do there – though it works by accessing admin.domain.com.
What you can do is go into System Settings -> Server Templates -> Default -> Apache website, and set “URL for admin redirect” to the URL for Virtualmin that you want to use.
That will apply to new domains added to your server.
To apply that to existing domains, you can run these commands on the command line as root: