All domains goto /var/www/html/

Hi, I have installed virtualmin on a virtual machine, after installing centos 5.5 32bit, i downloaded the and run that as instructed, all seemed to be going well, the only error i noted whilst installing was that CalmAV was out of date, presumably that will sort it self out.

Im using two domains -, and

im a little unsure how to set up dns, so, Ive setup two domains in different ways, all domains are registered with godaddy.

For, I changed only the A record,

A @ (my public IP) CNAME e CNAME email CNAME ftp @ MX @ MX @

im not concerned about email just yet.

I have another domain, , for this domain, i registered, and, and set my the ip as for both

I then set the nameservers for to, and

however, after creating a new virtual server,setting as the domain i found that browsing to either domain, i arrive at /var/www/html/

ftp works correctly, and i can upload pages to either domain, as expected. ( the pages turn up in /home/USER/public_html. )

any suggestions as to how i would go about diagnosing this would be really helpful

Im at a point now, that ive played with so much, i cant remember all the changes i have made, i did take a snapshot of the vm before i messed with stuff, but would like to understand whats happening, rather than just play with it for days, untill it works :)

Regards Pat.



Having the problem you're seeing usually means that there's a VirtualHost entry in /etc/httpd/conf/httpd.conf that doesn't contain your IP address.

All of the VirtualHost blocks should begin something like this:


If instead, one of them somehow got confused, and either isn't using that IP address, or is using a * (which would look like this: ) -- that could cause the problems you're seeing.

Also, there needs to be a "NameVirtualHost" line somewhere in your httpd.conf. Those things are normally handled by default, it sounds like somehow or another things got confused.

We'll help point you in the right direction with this issue, but for future reference -- the support area here is for Virtualmin Pro customers. If you're a Virtualmin GPL user, you'd want to use the forums to get support for your Virtualmin setup... thanks! :-)

Thanks for you quick reply, and sorry I posted in the wrong place!

I have checked /etc/httpd/conf/httpd.conf and that seems to be good.

One thing i failed to mention, is that im behind a router !

Should I ask in the forums?

Thank again for your help.

regards Pat

re posted in Home for newbies.

Sorry, we're not ignoring you -- I was just out grabbing lunch :-)

I think the issue with you behind behind the NAT router may indeed be the issue.

Apache would be listening on your internal IP, not your external IP... so the IP address in the VirtualHost block would need to be your server's internal/LAN IP address.

First, to make sure that the correct IP is used on new domains -- if you go into System Settings -> Virtualmin Configuration -> Network Settings, make sure that "Network interface for virtual addresses" is set to your server's primary interface, "Default virtual server IP address" should be "From network interface", and "Default IP address for DNS records" should be "Automatically detect external address".

After you do all that -- go into System Settings -> Re-Check Configuration. If it gives you the "okay", then you're in good shape! The only thing you need to do at that point is to open up your Apache config, and change all the references to your external IP to instead point to your internal IP address, and then restart Apache.

Hi, Thanks once again for you help, it seems you was right from the start.

I now have My domains working correctly :)

I cant tell you how impressed i am with the support here, your doing a great job.

Regards Pat.