#1  
Old 22nd July 2012, 19:01
Unfaiir Unfaiir is offline
HowtoForge Supporter
 
Join Date: Jul 2012
Location: Orange County, CA, USA
Posts: 43
Thanks: 14
Thanked 4 Times in 2 Posts
Question Default Site For IP?

When I type in my IP address into a browser, it takes me to one of my sites. I'm sure there is a logic to which site ISPConfig 3 is picking, I think its choosing the first site I made. How can I control which site is the default site that gets shown when the IP address is typed into the browser?
Reply With Quote
Sponsored Links
  #2  
Old 22nd July 2012, 23:15
MaddinXx MaddinXx is offline
Senior Member
 
Join Date: Jul 2011
Location: Switzerland
Posts: 197
Thanks: 25
Thanked 60 Times in 44 Posts
Default

If you created name-based virtual hosts it should not point you to one of those sites.

However, if you created IP based sites it takes you to the one which has the IP address set.

The default site would be /etc/apache/sites-available/default and should point you to /var/www/.
Reply With Quote
  #3  
Old 23rd July 2012, 01:47
Unfaiir Unfaiir is offline
HowtoForge Supporter
 
Join Date: Jul 2012
Location: Orange County, CA, USA
Posts: 43
Thanks: 14
Thanked 4 Times in 2 Posts
Default

Quote:
Originally Posted by MaddinXx View Post
If you created name-based virtual hosts it should not point you to one of those sites.

However, if you created IP based sites it takes you to the one which has the IP address set.
I just have all of my sites created with *:80, its just easier that way and assigning IPs was giving me issues with sites loading.

Quote:
Originally Posted by MaddinXx View Post
The default site would be /etc/apache/sites-available/default and should point you to /var/www/.
I don't have a default in my /etc/httpd/conf/sites-available, just the files created by ISPConfig 3 in there.

I can always resort to checking the %{HTTP_HOST} in a RewriteCond at the site that the IP leads to, but that doesn't seem very elegant. There must be a better way.
Reply With Quote
  #4  
Old 20th September 2012, 20:47
Unfaiir Unfaiir is offline
HowtoForge Supporter
 
Join Date: Jul 2012
Location: Orange County, CA, USA
Posts: 43
Thanks: 14
Thanked 4 Times in 2 Posts
Exclamation Still having issue

So I'm still having this issue to this day.

Whenever I enter a non-existent subdomain for any site, or if I enter the server IP, it brings me to a certain site on my server. I have no idea how ISPConfig has chosen the default site that it has chosen to use in these cases. This WOULD be fine, but ONLY if I can control what site it brings me to.

I've tried using /var/www/html, but that location never gets accessed.

Does anyone know how to change what default site ISPConfig 3 brings you to when you enter a non-existent sub-domain for a site or just enter in the IP for the server?

Last edited by Unfaiir; 20th September 2012 at 22:01.
Reply With Quote
  #5  
Old 20th September 2012, 21:58
Unfaiir Unfaiir is offline
HowtoForge Supporter
 
Join Date: Jul 2012
Location: Orange County, CA, USA
Posts: 43
Thanks: 14
Thanked 4 Times in 2 Posts
Unhappy Update...

I looked into how my sites were setup in ISPConfig 3 and they were all set to use * as the IP. One by one I went in and set them to the server IP instead of * in ISPConfig.

I noticed two interesting things. First, when I set any site to use the server IP instead of *, it would no longer work. Second, whenever I set whatever site was acting as the "default site" to not use * as the IP, another site that still was using * as the IP would become the new "default site". It seems as though the most recent site that was setup in ISPConfig 3 to use * as the IP will become the "default site". This is bad, I need to control which site is the "default site", not let the "most recent * IP site" become the new goto "default site" for all non-existent sub domains or by directly entering the site IP into the browser.

After all sites were no longer using * as the IP, I noticed that none of my sites would load and that /var/www/html was now being used as the "default site".

Ok.. what is going on here? To me it seems like some kind of IP configuration issue. So I go into my /var/www/html and drop in a phpinfo(); and take a look.

I noticed that when I scroll down to Apache vars and i see my servers internal IP address instead of my servers public IP address. My server is behind a router which routes all incoming traffic to the server on a static internal IP:

Code:
SERVER_ADDR 	192.168.2.111
I believe I see what is happening here. I set ISPConfig to have the sites use my servers public IP address, however, here is my internal IP address being used by Apache. Something is a miss here in IP land and I'm not sure exactly what it is or how to fix it.

Does anyone know how to configure this router/server/IP situation to work correctly with ISPConfig? It seems I must have done something wrong with the IP configuration or forgot something, but I don't see what yet.

My server is behind a router, which then assigns the server an internal static IP of 192.168.2.111. I need ISPConfig to let the public IP be the ONLY choosable IP in the drop down when setting up a site though. I don't want 192.168.2.111 to show up in the drop down at all for anyone to choose as their IP.

My goal is to let a client of mine use this system too for their site and I don't want to allow them or make them choose the server's internal IP if I don't have to. In fact, I'd rather they not be able to use * either because it seems like whatever site is the "LAST" site to enter * as their IP becomes the latest and greatest "default site" for the server according to ISPConfig. I don't want my client to become the default site just because she used * as her site IP after me.

Can anyone help?

Last edited by Unfaiir; 20th September 2012 at 22:05.
Reply With Quote
  #6  
Old 5th February 2013, 20:04
Unfaiir Unfaiir is offline
HowtoForge Supporter
 
Join Date: Jul 2012
Location: Orange County, CA, USA
Posts: 43
Thanks: 14
Thanked 4 Times in 2 Posts
 
Unhappy Fresh Install, Same Problem...

I've done a fresh install and still have this issue.

What I Expect To Happen:
I want blah.domain.com to throw a 404 error as it should when the subdomain blah doesn't exist for domain.com.

What Actually Happens:
If blah.domain.com is not a valid subdomain, the client is redirected to the first domain on the server it finds (bottom up) that has autosubdomain set to *..

Why This Is Bad:
1.) Client#1 creates a site: anysubdomain.com and sets autosubdomain to *.
2.) Client#2 creates a site: myblog.com and sets autosubdomain to www.
3.) Patron#1 while trying to view myblog.com, accidently types ww.myblog.com and instead goes to Client#1's site of anysubdomain.com
4.) Patron#1 calls Client#2 (who knows absolutely nothing about computers) and says, your site has been hijacked! Call your hosting provider immediately!
5.) Client#2 calls ME and cusses me out saying WTF am I paying you for, you let my site get hiijacked!? You have the worst service ever! I KNOW where you live and I don't handle things through the police! (True story BTW)


Help Please?
__________________
We are not equal
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix/courier/Centos 6 cant send email to external email servers maxtorzito Installation/Configuration 14 7th October 2011 10:56
postfix problem jagsler Server Operation 41 7th July 2011 14:19
Intel 82815 Video Card & Ubuntu 8.10 harvey527 Kernel Questions 8 5th November 2010 14:51
User creating shoevring Developers' Forum 7 25th July 2010 10:17
CentoS doesn't send the emails vaio1 Installation/Configuration 18 5th November 2008 17:51


All times are GMT +2. The time now is 05:43.


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