I have several Virtual Hosts on my Apache2 server. What I'm trying to achieve is to set one of these hosts as the primary one. So that whenever I type in my IP address in the browser, it brings that one specific host up. How can I do this?
|
feedback
|
That will capture all IP's that hit port 80 (or whatever port you tell it) that aren't configured elsewhere. | |||||
feedback
|
|
Apache layout is designed so that the 1st virtual host in your conf file is the default host. If no matching virtual host is found, then the first listed virtual host that matches the IP address will be used. Let's go with a simple example:
In the above case whenever you type any ip it will lead to siteA. Second case:
In the above case, siteC will be displayed when 10.0.0.1 is used because it comes first. | |||||||||||
feedback
|