Virtual Sites all try to go to /var/www instead of /home/website

All virtual sites that are created attempt to load there data from the /var/www directory instead of the appropriate /home/website directory. The issue is happening on clean barebone install of centos 5.5 (network install)

To recreate the problem install centos and run the install script obtained form the serial number page. Create a virtual site and observe that it doesn't work.

NOTE: I had a perfectly good installation using the free setup. The only thing i have done differently between the two setups is give you money and trust your install scripts rather than doing the install manually.

Status: 
Closed (fixed)

Comments

Howdy! Sorry to hear Apache isn't working as expected.

The install.sh for Virtualmin Pro and GPL are essentially the same, the only real difference is the control panel it pulls down.

We can certainly get that fixed up though; can you verify what Apache version you see on there? You can determine that by running this on the command line as root:

rpm -qa | grep httpd

When you rum that, what output do you see? That should help us verify both the version and the repository it's being pulled from.

It's also possible that there's a default entry listed in your Apache config that's causing problems. Could you attach your /etc/httpd/conf/httpd.conf file to this request? We can review that and see if there's an entry in there which would prevent new VirtualHost blocks from working.

Thanks!

[root@www ~]# rpm -qa | grep httpd system-config-httpd-1.3.3.3-1.el5 httpd-2.2.3-43.3.vm

All of that looks good! You're using the correct Apache version, and there's no extra entries in your httpd.conf fiel that would be causing trouble.

Are you by chance running your server on a private IP address? If so, that would explain the behavior you're seeing.

If there's a router in front of your Virtualmin server with a public IP, that forwards requests to your internal server -- that would cause Apache to get confused.

To correct that, what you'd need to do is go into System Settings -> Virtualmin Configuration -> Network Settings, and change "Default virtual server IP address" to use your server's internal IP address (which appears to be 10.0.0.3).

And then on that same screen, for "Default IP address for DNS records", you'd want to make sure that was using your external (public) IP address.

After making those changes, the simplest way to apply those settings would be to remove Virtual Server you have setup there, then re-add it. Once you re-add it, it should correctly use your new IP address settings.

Doing as you instructed solved the issue. Thank you for your time and patience. I had my public IP address set instead of my private address.

Automatically closed -- issue fixed for 2 weeks with no activity.