Virtualmin on Amazon EC2, wildcard IP addresses

We use Virtualmin on Amazon EC2, effectively for the most part. The big annoyance is that when creating a new virtual server or subserver, the private IP address of the Amazon instance is used. This is non-functional because you usually get a new IP address when the instance is stopped for any length of time and then restarted. The “Elastic” IP address is a better choice, but even that can change for strategic reasons, or likely in a scaling situation. The BEST choice is to use * to wildcard the IP address.

I have read this thread that seems to address the issue:
But in fact it doesn’t actually solve the problem. I have it set as NameVirtualHost *:80, and it’s the only one present in the configuration. I still get a specific IP address for new servers, and not even the right one (anymore).

How to address this?

Currently, we have to wait until low traffic times to create sites/subsites, and then:

  • Use virtualmin to create the server
  • go to Apache config and load the .conf file for the new site
  • change <VirtualHost> to <VirtualHost *:80>
  • restart apache

I have tried setting the IP address of new servers as *, but that doesn’t work.



Not sure if this will help with your needs but… You could look into setting up VPC for your instance (we did this to deal with SSL certs and every site needing an EIP and assigning it to a private IP). This effectively lets us create/manage private IP addresses and then assign an EIP to a private IP.

This is very old post, but we have encountered similiar issue just a few days ago, but not Amazon but self hosted instance.

We reported this here and also saw that there are another report here and here

We have Ubuntu 16.04.

Found the solution: see