Virtualmin behind NAT, 3 domains, 1st domain web page always shown

I gave up trying to solve this on my own, asking for help :slight_smile:

I have 3 domains, lets name them example1.com, example2.com, example3.com.
Public IP: 89.x.x.x
Local IP: 192.168.1.77
NAT enabled to forward all to 192.168.1.77

Installation is on a Ubuntu 18.

example1.com is for webmin.
example2.com and example3.com domains are setup as virtual servers in Virtualmin.

My problem is, no matter what I do, example1.com domain’s webpage loads also for example2.com domain.

Can this be solved and how?

Thanks in advance!

In Virtualmin -> Virtual Server Summary, is the IP address 192.168.1.77 for each domain?

Is now. That solved the problem. Thank you!

But I had to set this under Virtualmin, Addresses and Networking, Change IP address.

When I tried doing this under Virtualmin, Server Configuration, Change IP Address, it failed for 2nd and further domains as I got an error that the 192.168.1.77 IP is already in use.

Now all I got to figure out is how to get Webmin working with a self signed or LetsEncrypt SLL and it’s a win :slight_smile:
The SSL part of Webmin (not Virtualmin, SSLs work for each domain) is not working and can’t get it to work, with the self signed certificate I get NET::ERR_CERT_COMMON_NAME_INVALID with the browsers, LetsEncrypt returns me an error:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for example1.com
Using the webroot path /home/example1/public_html for all unmatched domains.
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. example1.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://example1.com/.well-known/acme-challenge/XrcOVzBC5k3P3yk8VcRPWMeKT7pk68iAjt36RdhUdIk [89.x.x.x]: “\n\n404 Not Found\n\n

Not Found

\n<p”
IMPORTANT NOTES: