I just setup a new site on my server (and deleted it and re set it up) and each time i try to view it i get a different site on my server. This has been an ongoing issue and I would like to know what the permanent fix is.
you should pay for a pro-fessional webmaster too… you obviously don’t know sh*t about apache.
apache uses symlinks. there’s official apache-provided tool called a2ensite which does exactly that. (=symlink to sites-available/site.)
something else is wrong, but not providing details (files/logs/etc), isn’t gonna get you anywhere closer to debugging your issue…
I’m sorry, I wasn’t intending to be confrontational, just trying to rule out things that can’t be the cause of the issue.
I still don’t really have any ideas about what you’re seeing; symlinks is how this is normally done on Ubuntu, so I’m not sure what is going wrong in your case. We’d need more info. Errors from the error log might help clear it up.
This thread has cemented our dedication to our new project. We will be dumping virtualmin and moving to an actual containerization solutions. Webmin is a fine tool but the virtualmin team is not one we wish to continue working with.
I had the experience you described yesterday with a second Virtualmin-based server that I’m building. I migrated a Virtual Server containing four domains (call them domain1.com … domain4.com) and four small web servers to the new Virtualmin-based server, which is running Ubuntu 18.04.6.
All other aspects of the migration were resolved and worked correctly. But when I tried to look at domain1.com or one of the other domains with a web browser, I was shown the home page of a website that previously existed on this second server.
I compared the Apache .conf file for properly-functioning web server with one of the newly-migrated .conf file (i.e. domain1.com.conf, domain2.com.conf, etc.) that exists in the /etc/apache2/sites-available directory.
What I found was the VirtualHost directives in the newly-migrated .conf files only referenced the iPv4 address, but the properly-functioning web server referenced both the the iPv4 and the iPv6 addresses.
When I added the iPv6 to the newly-migrated .conf files, saved them, and restarted Apache, the five web servers all started working correctly and resolving to the correct domain names.
I hope this explanation makes sense, and it helps someone avoid a bunch of manual file comparison that I ended up having to do.
If you just google “virtualmin wrong site shows up” you should get that link (hopefully). Er, I just checked, and Google pushes it to the fourth result and shows the ancient archived doc version (argh, frustrating, I guess I need to figure out how to tell Google some other page is correct, somehow), but DuckDuckGo gets it right and it is the first result.
Edit: And, of course, searching the forum will also turn up a bunch of discussion. It’s a common problem, and not one we can easily prevent (though we’ve tried…if you go back far enough, you’ll find a lot more gnashing of teeth about it because we relied on different default behavior when creating domains…detecting any * as an invitation to always use *, which makes more of a mess than the opposite, which is what we do now). When you have multiple IPs, and you have virtual servers using different indicators of IP:port combinations, you get Apache’s wildly unintuitive selection code at work…and it doesn’t behave in the way anybody would ever expect, I think.
Yeah, I think it’s worth updating our docs to also cover the IPv6 case. It’s the same problem, it just looks a little different…it may not jump out at someone if they don’t see the exact situation described in the doc.