HI Team,
I work at Lajungle Design, and we use Virtualmin 3.80Pro. Webmin version 1.520 Virtualmin version 3.80 Pro on Ubuntu 10.04LTS
Our last issue was when trying to upgrade from previous Virtualmin (3.7x Pro) to 3.8Pro and it was resolved by installing a package the support made available for us instead of automatic update.
We though everything was fine, but in fact it seems we have a small but annoying issue.
When we create a virtualserver and we select the Virtual IP he should get. Apache conf file are created without this IP on it. Thus Apache wont redirect the navigator to the website directory. Instead it will redirect to the first entry it has on its list for this IP.
let say I have domainA running on shared IP : AA.BB.CC.DD as it was previously configured it works.
now I setup domainB on the same shared IP AA.BB.CC.DD this is domainA website which is served to navigator.
but if I modify the apache domainB config file to add the IP from to
and restart apache, it works.
Any idea why virtualmin was right until the upgrade to 3.8 and doesnt do that right now :( Want do I have to check for you to help me ?
Thanks for your time. Johann
Comments
Submitted by JamieCameron on Thu, 10/07/2010 - 11:45 Comment #1
It almost sounds like Apache isn't being restarted after virtualmin adds a domain.
If you just restart Apache manually, does this also fix the problem?
Submitted by neox@lajungle.fr on Tue, 10/12/2010 - 12:54 Comment #2
No, if I restart apache2 manually it does not change anything.
The domain config file only show < virtualhost *:80 > ... ... < /virtuahost >
where it should show (as for older domain) < virtualhost my-virtual-ip-here:80 > ... ... < /virtualhost >
if I change the config file manually, then restart apache2 it works.
But it does not, if I just create the domain using virtualmin and just restart apache2
Submitted by JamieCameron on Tue, 10/12/2010 - 15:05 Comment #3
Ok, the issue might be that your Apache config has a
NameVirtualHost
directive that is wrong.Does it help if you edit /etc/apache2/apache2.conf and add the line :
NameVirtualHost *:80
Submitted by neox@lajungle.fr on Wed, 10/13/2010 - 11:46 Comment #4
I did not have this line in the apache2.conf file but had them into the port.conf file.
I changed it to set it up in the apache2.conf then remove the IP from < virtualhost > directive in the /etc/apache2/site-enabled/mydomain.com.conf file. then restart apache2
and I still have the issue that mydomain.com is going to the default website regarding the IP I set in DNS.
and the IP need to be setup inside the mydomain.com.conf file, to get my browser inside the right directory.
But as I said it before everything was fine BEFORE we upgrade to 3.8Pro all my domains (around 50) have theyr IP inside the virtualhost directive in the apache2 domain.com.conf file.
That's why I guess it is a bug :(
Submitted by JamieCameron on Wed, 10/13/2010 - 16:57 Comment #5
If you like, we could login to your system and see what is going wrong ..
If that is possible, you could either send login details to jcameron@virtualmin.com , or grant remote support access from within Virtualmin.
Submitted by JamieCameron on Sat, 10/16/2010 - 00:46 Comment #6
So what NameVirtualHost directives exist in your Apache configuration? You can find them with the command :
grep NameVirtualHost /etc/apache2/* /etc/apache2/*/*
Also, is the IP Virtualmin is putting into the <virtualhost> block the same as the IP address of the
eth0
network interface on your system?Submitted by neox@lajungle.fr on Mon, 10/18/2010 - 04:07 Comment #7
I currently have
root@xxxxx:/etc/apache2# grep -r NameVirtualHost *
apache2.conf:NameVirtualHost *:80
apache2.conf:NameVirtualHost 91.121.A.B:80
apache2.conf:NameVirtualHost 91.121.C.D:80
apache2.conf:NameVirtualHost 91.121.C.E:80
apache2.conf:NameVirtualHost 91.121.C.F:80
apache2.conf:NameVirtualHost 91.121.C.G:80
apache2.conf.dpkg-old:NameVirtualHost 91.121.C.D:80
apache2.conf.dpkg-old:NameVirtualHost 91.121.A.B:80
ports.conf: # If you add NameVirtualHost *:443 here, you will also have to change
ports.conf.dpkg-old:#NameVirtualHost *:80
ports.conf.dpkg-old: # NameVirtualHost statement here
91.121.A.B is the main IP on eth0
others are virtual IP on eth0:1 eth0:2 ...
Previously created domaine got the correct IP on theyr config file
whether it is the real IP, or the virtual one.
But newly created just got
< virtualhost *:80 >
in there config file
and I have to change it to make it work
Submitted by JamieCameron on Mon, 10/18/2010 - 11:40 Comment #8
You might want to try removing the
NameVirtualHost *:80
line , as it seems to overlap with your otherNameVirtualHost
lines that are on specific IPs.