Site not displaying after an IP change? (AWS instance ip change after restart)

I’ve installed virtualmin and webmin on a small amazon AWS server for playing around with my site - sort of a development or staging environment for my production environment - seems like a good idea since I can turn it on and off and only pay a few cents per hour.

Every time I start the aws instance the server gets a new IP address, when I login into virtualmin I get the warning that the IP address has changed and I get promted to change it in the configuration - and I do this with no issues, the message dissapears after this update.

I also have to update my DNS settings on couldflare to point to this new IP address.

One thing that I have not been able to figure out is why after the DNS change has been propagated, I visit the URL and I dont get the site, I just get a blank directory listing, seems the server is showing me a default virtual server instead of the proper named virtual server.

I’ve been searching the forums with no answer yet, perhaps I am bad at searching :slight_smile: , any guidance would be appreciated

Hmm… you mentioned that every time you reboot, you have this problem… it sounds like you’ve seen this issue a few times – does that mean you’ve resolved this issue in the past?

If so, what did you do to resolve it?

Also, does this documentation here help:

In particular, the section named “The wrong website shows up”.


when I had the issue I found that deleting and recreating the virtual server would do it.

Today I started the machine again - and found my error.

When using AWS, when you start your machine after it has been down for a while you will get a new internal and external IP assigned - when you first login to virtualmin you will be promted to do an IP update - you MUST use the internal IP you get from the AWS console for your machine, not the external - using the external IP address causes all sites to serve the default website content and not the content for the site.

Eric thanks for your reply, hopefully my finding would help someone else (although now that I think about it it was very obvious)