Hi,
I see some discrepancies in previous posts.
I'll explain the problem again, removing all of the unnecessary information.
You have the hosts file:
- Code: Select all
192.168.0.1 site1
192.168.0.1 site2
192.168.0.1 site3
192.168.0.1 being the IP address assigned to network card.
Using that address and that address alone (no 127.0.0.1), I want all of the following to be true:
1) When user enters site1 in browser, C:\site1 is served
2) When user enters 192.168.0.1 in browser, C:\ip is served
3) When user enters anything else (site2, site3) that resolves to the 192.168.0.1, default site is displayed (C:\default)
I've accomplished parts 1 and 2, but I have difficulties with part 3.
The solution that will solve all of my problems is a directive which checks for IP address rather then HTTP Host header (ServerName) but as I browsed through the documentation, I don't believe there is any.
I can post parts of Apache configuration if you believe I might have misconfigured it.