I could do this really easily with cPanel earlier, but now that I migrated to Virtualmin, I just do not know how.
If I have a site with domain www.mysite.com running on Webmin/Virtualmin, I just want a subdomain that can easily allow me to access the Virtualmin console.
Currently I always have to type www.mysite.com:10000 to get to Webmin/Virtualmin
I want to create a subdomain called webmin.mysite.com and this should automatically take me to www.mysite.com:10000
On my external DNS service I've already created a CNAME record set for webmin.mysite.com which points to mysite.com (that was the way it was done in cPanel too).
Now I need to configure Virtualmin somehow that whenever there is webmin.mysite.com in the URL, it will take me to www.mysite.com:10000
Help appreciated, thank you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks very much, proxy seems to work, I searched a bit more on proxy and used the solution from here (bottom post): https://virtualmin.com/node/13580
Created a sub domain webmin.mydomain.com (for example)
In Server Configuration -> Edit Proxy Website set Proxying Enabled to Yes and write the Proxy to URL https://mydomain.com:10000
Select mydomain.com in Virtualmin and in Server Configuration -> Manage SSL Certificate -> Let's Encrypt -> Request certificate (if you don't have already a certificate for this domain)
In Server Configuration -> Manage SSL Certificate click the Copy to Webmin button to use mydomain.com certificate for webmin
In Webmin, Webmin -> Webmin Configuration -> Trusted referrers add mydomain.com and webmin.mydomain.com to the Trusted websites list
**I'm having 2 problems still:**
1) If I just type "webmin.mydomain.com" in the browser, it doesn't work as it directs to just http and says problem with Cookies, however if I type "https://webmin.mydomain.com" it works
2) Even when it works with https, the SSL certificate for the parent site is not used https://webmin.mydomain.com shows as not secure
Last edit: Zeeshan Khan 2020-02-21
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I could do this really easily with cPanel earlier, but now that I migrated to Virtualmin, I just do not know how.
If I have a site with domain www.mysite.com running on Webmin/Virtualmin, I just want a subdomain that can easily allow me to access the Virtualmin console.
Currently I always have to type www.mysite.com:10000 to get to Webmin/Virtualmin
I want to create a subdomain called webmin.mysite.com and this should automatically take me to www.mysite.com:10000
On my external DNS service I've already created a CNAME record set for webmin.mysite.com which points to mysite.com (that was the way it was done in cPanel too).
Now I need to configure Virtualmin somehow that whenever there is webmin.mysite.com in the URL, it will take me to www.mysite.com:10000
Help appreciated, thank you!
Hi,
You need to setup proxy, something like that:
PROXY SETUP AS VIRTUAL-SERVER
https://sourceforge.net/p/webadmin/discussion/600155/thread/6eb89f60/?limit=25
Thanks very much, proxy seems to work, I searched a bit more on proxy and used the solution from here (bottom post): https://virtualmin.com/node/13580
**I'm having 2 problems still:** 1) If I just type "webmin.mydomain.com" in the browser, it doesn't work as it directs to just http and says problem with Cookies, however if I type "https://webmin.mydomain.com" it works
2) Even when it works with https, the SSL certificate for the parent site is not used https://webmin.mydomain.com shows as not secure
Last edit: Zeeshan Khan 2020-02-21
Resolved in Virtualmin forum here: https://forum.virtualmin.com/t/cannot-get-a-subdomain-forward-to-a-different-port-of-parent-ip/104600
Thanks Ilia for your help on both forums, cheers!