Question about Apache virtual servers.

I am hosting multiple virtual hosts on my Virtualmin GPL server.
I also have a backup location where all domains are backed up in case of emergency.

Here is my question.
When i setup a new virtualmin server to host domains i find that all domain names point to the standard apache virtual server (/var/www/)

The only way i can solve it is to generalize the addresses for each virtual server (*:80)
Then to ease up the process of creating new servers, i need to generalize the standard settings for server creation.

Why does everything point to the (/var/www/) virtual server when the other virtual servers has an IP stated in their configurations?

I use latest virtualmin GPL with latest updates to all modules and latest stable release of debian.
All virtual domains are hosted on same IP


It sounds like the VirtualHosts using *:80 are overriding those using the IP address, such as x.y.z.q:80.

What you would want to do is make sure none of your VirtualHosts are using *.80, they should all be setup to use an IP address.



After setting all virtual servers to specified IP (except the Default server entry witch can’t be changed to IP, it always listens on all addresses and ports) the error returns.

The sites says
“Not Found
The requested URL / was not found on this server.”

When reading the apache error logs i find this “File does not exist: /etc/apache2/htdocs”
Does it revert back to some apache standard settings?

The only fix i know of is to change all virtual servers to listen to all addresses.

The error occures when all the virtual servers are listening on global IP.
When changed to local IP the error seems to dissapear.

Is virtualmin/webmin/apache not designed to work with the external IP for the virtual domains?
Will everything run as it should when changed to local IP instead of listening on any IP?

Best regards.

Ah, are you behind a NAT router?

You would indeed need to setup Apache to listen using the local IP, not the public IP.

Also, you’d want to go into System Settings -> Virtualmin Config -> Network Settings, and make sure that Default IP address for DNS records is set to “Automatically detect external address”.