These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for default website on IP on the new forum.
Probably a very simple answer - one of my clients - blahblah.ie - has asked why when you type in http://123.123.123.123 do you get the billybob.ie site? Is that some sort of default?
I have all the sites set-up on a shared IP , i would presume this would cause the issue , however why would site billybob.ie get shown on the default IP rather than any of the other site sharing that IP , and how can this be changed,fixed?
Yup, it's the default setup in Server Configuration -> Website Options -> Default website for IP address.
If you haven't set that, it defaults to the first entry on that IP that Apache sees.
-Eric
sorry i should have mentioned im using virtualmin
Hi,
Here's what I did in my configuration in order to setup a specific page to show for the IP address when entered.
Go to: Webmin > Servers > Apache Webserver > Create virtual host
For "Handle connections to address" choose "Specific address", enter the IP address.
For "Port" click the radio option next to the field, then enter 80.
For "Document Root" specify the server directory where the default website is located.
Click "Create Now"
Finally click "Apply Changes" (upper right corner)
This will ensure that traffic to the IP address is shown the website you specified.
Repeat these steps for any other IP address(es) and/or ports you want to set defaults for.
*** These rules work with Virtualmin GPL, and don't worry Virtualmin won't overwrite them later. ***
-- Peter
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
how would I make "Default website for IP address" be served from /var/www/html ?
setting "Automatic Virtual Hosts" for the default website to /var/www/html essentially disables all other vhosts: every request (with a proper domain name that matches an active vhost) is sent to that empty directory. it doesnt matter if i check "Use IP address instead of hostname" or not.
so my question still stands.
thanks
peter's solution doesnt work once you already have a vhost setup as "Default website for IP address" in "Website Options". it seems that the only way to take that priority from another vhost is to create a vhost for the IP address in VIRTUALMIN (creating it in webmin, as suggested above, doesnt make the vhost show up in virtualmin therefore it can't be selected as the "Default website for IP address")
ideas? anyone?
thanks in advance
Peter is almost right.
The trouble is that Apache just trolls down its list from the top for a site matching the IP so you need to give your specially created virtual server (as per his instructions above) a name that puts it first in the list (after the Any address entries).
For example, name the server 'AAAMeFirst' and you will then get the required behaviour.
Don't worry i will help you ..Even though many sites hosted under a shared ip,if it displaying a particular site,it is because the default server configuration.So that only when you typed the particular ip address it is displaying the billybob.ie.To resolve (fix) this issue/problem you can change the settings in the server.So it will not display the website,if you type the shared ip address.You can check the ip address of domain names hosted in shared ip using the site Ip-details.com Here you can enter the domain name and it will display the particular Internet Protocol Address(IP-address).