HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   using * in ip address always redirects to first site (http://www.howtoforge.com/forums/showthread.php?t=58693)

vmos 12th September 2012 13:57

using * in ip address always redirects to first site
 
Good morning, I'm using ubuntu 12.04 with apache and ispconfig 3.0.4.6.

In this setup I've created a reseller and the reseller will have multiple clients. Each client will be able to add their own sites. I've got two problems (or maybe one depending on how you look at it)

If a client leaves the wildcard * in the ip address drop down field and creates more than one site, each site will redirect to the first one created.

I could get around this by using an IP address instead of *, but I can't find a way of allowing more than one client to use the same IP. This server is going to have a whole bunch of clients and only one IP so they can't have more than one each.

Can anyone point me in the right direction for either of these issues?

/edit, actually strictly speaking it's not the first site created, it seems to pick the first alphabetically

/edit/edit mostly fixed it. In /etc/apache2/ports.conf, I had this line hashed out

NameVirtualHost *:80

not entirely sure why that was, but un-hashing it fixes the issue. The only thing is that going to the servers IP address now brings up the first website instead of the holding page. Hang on I may have the answer.

Yep that's it. I created a site called 0000000000000000000000000.com so it'll always be first alphabetically and I'll put the holding page there.

meth 13th September 2012 17:43

I have similar bug
 
I have a similar bug, but it works different, because I setup subdomains in different folders and all shows me the same webpage, that isn't the first.

I am using nginx.

Example:
I have two domains abc.com and dfe.com, I set up a subdomain of abc.com d.abc.com as a different website, when I try to enter in d.abc.com I get dfe.com.

till 13th September 2012 17:55

What vmos2 described is not a bug, its the default behaviour of the apache webserver. A IP based vhost is always a stronger match then a wildcard based vhost and if you want to have a specifiv site shown first, then you have to craete a default vhost like vmos2 did and like it is described in several posts here.

To ensure that the correct page gets shown, ensure that you do not mix wildcards with IP addresses.

meth 13th September 2012 18:00

What about nginx issue?

till 13th September 2012 18:57

Did you select *or IP in both sites or did you mixed them?

Btw. please dont post nginx questions in a apache thread.

meth 13th September 2012 19:06

Same IP, server IP, and sorry, should I change my question to a new post?

falko 14th September 2012 16:31

A specific IP, or just *?

meth 14th September 2012 16:40

You can check my vhost configuration in http://www.howtoforge.com/forums/showthread.php?t=58714


All times are GMT +2. The time now is 17:40.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.