virtualmin: Subdomain be hosted on another lan server but use same external IP.

February 14, 2018 2.1k views
Apache Server Optimization DNS Ubuntu 16.04

First, I would like to thank the community here… your answers and tutorial has really helped me in the past year. Maybe someday i would be able to pay the favor back. A heartfelt Thank you.
I have this weird problem. I have two servers, lan addresses and . i have set up webmin/virtualmin on I have forward port 80,53,587,465,143 on my router to point to The main domain is hosted in, it works fine. I added a subdomain to in then i modified the DNS A record of to point to instead of my external IP.
Here is the weird part. If i am in the lan network (my computer address is i can surf both and very well with no problem. But if am at home i can only surf ,**** says no response.
What am i missing,Dint the DNS Propagate? i need both and to have the same external IP but to be load from .
How can i achieve this? I couldn’t figure this out since last November! any help i would greatly appreciate.

3 Answers

I found a solution that works for me, May be it will help somebody someday.
i went to my first server and made sure each of the modules are enable below:
sudo a2enmod proxy
sudo a2enmod proxyhttp
sudo a2enmod proxy
sudo a2enmod lbmethod_byrequests
Then i logged on in my virtualmin on my first server and created a subdomain I navigated to the new subdomain in my virtualmin. Click on Server Configuration>Edit Proxy Website
Proxying enable [yes]
proxy to url []
click save and apply. Reboot server.
Thats it!

p.s. my server is ubuntu 16.04 and webmin/virtualmin 6.02

Domains and IPs are public info, why are you redacting them?

  • I thought it will be easier to get my question across. I learnt alot by someone asking a question with, and then building the question from their. any way am lost, please help

This is really great, exactly what I was looking for, thank you.
If only it would be possible to set it up for https too.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!