webmin-servers-apache webserver and go to configuration - edit configurstion or click on the ‘virtual server’ to edit only the specific domain
if the newly created domain has not propagated yet or you typed in a incorrect url then apache would take the first domain listed in the virtualhost section.
FTP and Webmin are irrelevant to this issue. ronald is correct about the most likely cause.
It’s pretty much always mismatched NameVirtualHost and VirtualHost sections, or you have a * in one or both of those sections (which can work in very simple cases, but nobody ever gets it right, so I strongly discourage it’s use).
Read this and if you still don’t see the trouble, come back with the relevant sections of your httpd.conf, and we’ll tell you how to fix it:
I have read it a few times before, but it does not tell you where to find the NameVirtualHost and VirtualHost sections
You haven’t mentioned your OS, which determines where this configuration happens. It’s in httpd.conf on Red Hat based systems, and somewhere in /etc/apache2 on Debian/Ubuntu systems, and somewhere in /usr/local/etc/apache22 on FreeBSD, etc. etc.
The actual root cause is misconfiguration in Virtualmin, though. The documentation I just linked explains where those options are in Virtualmin’s Module Config. If you configure Virtualmin correctly, it will not create VirtualHost sections that don’t work right…so, fix your configuration, and recreate the problem virtual server, and all will be well.
Okay, on CentOS all of the options you mentioned would be setup in the /etc/httpd/httpd.conf file.
Or, as Joe said, you could use Virtualmin to make those edits, by going into Webmin -> Servers -> Apache website, and getting at the config files from there.
You’d want to make sure that the NameVirtualHost and VirtualHost options were explicitly setting an IP address, rather than using “" as we’ve seen on a few systems here and there. The "” generally just causes trouble
-Eric
I recommended you correct your Virtualmin configuration (with pointers to the docs on how and where to do that), and then recreate the domain (in Virtualmin, of course!).
I am going to go over the servers settings again as I seem to always have to change a few things when I create a new Virtual Server.
Is this normal?
No. Not even a little bit.
Look over your Server Template(s), and the Module Configuration. Pretty much everything that gets setup during creation is configurable, so if you don’t like what the virtual servers look like when they are created, it means you haven’t configured Virtualmin to do what you want.