Attempt to set Apache port in a server template does not work

I have some VPS systems that I want to set up to use a Varnish proxy cache. The config I WANT here is to have all of the virtual apache sites run on port 127.0.0.1 and with port 8090. I've set up a server template called Varnish and in the template setup I have the IP set to 127.0.0.1 and the port set to 8090. And I have the default IP for the server actually set to 127.0.0.1 as well.

If I try to create a site with the Varnish template, it very happily gets created with the correct IP address, but it still gets created on port 80. It's easy enough to fix - just go into the change ip address for the domain, and change the port, and it fixes the configuration. But this is pretty annoying. This looks like some sort of bug - I can't figure out any way to make it work properly. This seems to be the case both in VIrtualmin GPL and Virtualmin Pro.

Status: 
Closed (fixed)

Comments

Ok, I see the bug that causes this - it will be fixed in the next Virtualmin release.

Status: Active ยป Fixed

I still seem to be seeing the same issue with this. Additionally any site where I change the port as mentioned continually reports as failing validation because Virtualmin doesn't think there's a matching Apache config for the domain.

How did you change the port exactly? The correct way is at Server Configuration -> Change IP Address.

That's how I changed it. I don't think the problem with it not recognizing the configuration happened before the last Virtualmin update. It looks like since the last update there are now 2 problems rather than one. I'm trying to do all of this through Virtualmin. And I still can't change the port number when configuring the domain initially - I still need to go in and do it afterward.

My original complaint is really not right.

The problem is that although the base domain name for the domain validates correctly, if there are any ALIASES for the base domain with an IP of 127.0.0.1 and a non-default port the ALIASES show up as not validating. The first domain validates fine - I'd not noticed which were working and which were not.

Ok, I see the issue here - Virtualmin isn't updating it's internal idea of what the port should be for an alias domain. I'll fix this in the next release.