I am having a similar issue, each virtual server I have setup routes to /var/www/html/index.html (i created the index.html file to confirm it loads from this location) instead of the respective directory like /home/myusername/public_html/
The httpd.conf for a user’s virtual host looks like this:
Are you saying that you have the above VirtualHost setup for "www.myusername.net", with a website in "/home/myusername/public_html".
But upon going to “www.myusername.net”, rather than seeing the content in /home/myusername/public_html, you’re being given content within /var/www/html/index.html?
[Tue Sep 16 04:02:21 2008] [warn] NameVirtualHost 10.250.15.128:80 has no VirtualHosts
The IP address of the NameVirtualHost is the internal IP address. There is also NameVirtualHost xx.xx.xx.xx:80 that is the correct IP address that matches the VirtualHost IP address.
I could PM you the webmin login, is there PM on this forum, i don’t see it?
I am trying to get virtualmin to work on my server and am having the same problem. It seems to be using the directives from
<VirtualHost *>
for all virtual domains rather than loading the configuration for that domain stored in
<VirtualHost xxx.xxx.xxx.xxx:80>
Is this a problem with Apache2 or Virtualmin? if it is a problem with Apache2, how do we fix it. I tried to remove <VirtualHost *>, but that only afforded me 404 errors.
Crap, you’d think once I got it working for walter that I’d post the fix here, but no, and now I’ve forgotten what I did
I believe what needs to happen though is that every VirtualHost line should be xxx.xxx.xxx.xxx:80 as you mentioned, but that there needs to be a matching "NameVirtualHost" above the first VirtualHost… something like:
NameVirtualHost xxx.xxx.xxx.xxx:80
Right now, that line likely exists, but with a "*" in it… just replace that * with the IP address and port.
-Eric
Hrm, would you be willing to post your httpd.conf file? If you’re reluctant to do that (which is understandable), would you consider emailing it to me? You can email it to eric@virtualmin.com – be sure to include a link to this post somewhere in the message body. Thanks!
-Eric
I’m a long time webmin user, so I thought I’d give virtualmin a try to host my sites. I don’t mind posting my conf files since the server is just a sandbox right now.
I don’t have an httpd.conf, the files attached are from the following locations:
In the file "default", delete the line "NameVirtualHost 127.0.0.1:80", and put your IP address in for the line "<VirtualHost 127.0.0.1:80>" in place of 127.0.0.1.
Then, restart Apache with:
/etc/init.d/apache2 restart
When you do so – do you get any messages on the command line? Anything unusual in /var/log/apache2/error_log?
And if not, does that work – and if not, what symptom are you seeing now?
Also, there’s some odd character endings in those config files. I’m hoping it’s simply related to attaching it here, but they all have MS-DOS style characters at the end. If we get stuck, I may recommend running dos2unix on them, but I wouldn’t worry about that quite yet
-Eric
The dos characters are due to me copying the config files and zipping them on a windows xp machine. My server is running on Ubuntu Hardy. I’ll give it a try and reply.
So, here’s the deal. It appears that Ubuntu Hardy has a problem with it’s Apache2 config. I just installed Virtualmin gpl (via the install.sh script) on Centos 5.2 and everything works wonderfully. Weird…
So, the fix seems to be this: Run virtualmin on an Enterprise Grade linux OS!
I cracked it. Needed to change the server settings so that all virtualhosts use the internal IP and change the <VirtualHost *> directive to match internal IP:PORT.