My Network:
41.208.61.58 ---- ISP Static public IP Connected to Cisco Router
192.168.1.1 ---- Internal Cisco router IP connectectd to network port
192.168.1.5 — Mikrotik Router (Eth1) connected to Cisco router
10.254.0.254 — Mikrotik Router (Eth2)
10.254.0.110 — Windows XP pro Web server with Apache 2.2
10.254.0.101 — My office PC where I manage the network and servers from.
So now…
When I type http://www.wowcomputers.co.za in a web browser it goes to the page I expect it to. and displays the information from the webserver.
I asked a friend (Connecting from outside my network) to do the same, and he gets the same web page. So we know the webserver is working
When I type in http://www.jonathan.za.net I get the same page as from http://www.wowcomputers.co.za. (NB. ALL BROWSING HISTORY HAS BEEN DELETED) How do I get 2 different domains to point to the same server, and the display different pages too.
I am guessing I need to do something in apache configuration, by letting it listen for specific web address, but the APACHE logs say that both domains orginate from 10.254.0.254.
Your first dst-nat rule is correct. The second rule (ether2 - I don’t know what you’re trying to do there…192.168.1.5 shouldn’t be showing up on that interface…)
Your src-nat rule… Isn’t the cisco nat’ing for you? Even if it isn’t - why use masq - use the direct method - src-nat to-addr=192.168.1.5. Actually - you should have a different 192.168.1.x address for your web sever - so as not to get in the way of accessing the MT router itself…but that’s just me.
Lastly - as to your Apache Web ‘appliance’ on the windows server…I have not used Apache on Windows for quite sometime but I am familiar with it. Under your Apache setup there are ‘two’ portions to the config - enabled-sites and available-sites, make sure both http://www.sites are in both configs (enabled and available). That should fix your issue… If not go over to the Apache home page and look up configuring under windows - there should be plenty of FAQs there…
If I do not add the ETHER2 rule, I will not be able to access the webserver from my office PC Due to the DNS resolving to 192.168.1.5, from the internal network.
The problem I have with the CISCO router is that I do not have access to it. It is owned and administered by my ISP, they will not allow me to have the login details. I have my whole network, behind my MT router, allowing me to configure my router as I wish.
Thanks.. checked out what you were talking about, did not find anything, but I will do more research… seems to be a “Virtualhost” thing. The thing is that the webserver sees all traffic coming from 10.254.0.254, which is my MT router, so I do not know how it will determine correct traffic.
I use Apache for virtual hosting on my servers for multiple websites. The ips are the same, the difference is in the header. But, like galaxynet, I have no experience with Apache on Windows, but I imagine it could not be much different. Does it have an “httpd.conf” file? If so this is it:. Look at the end of the file to see where the html docs are. I will use mine from Linux (/var/www/html), so translate where necessary.
Put docs in the respective folders. Won’t do SSL to these domains tho. Not a way I have seen anyway. SSL encrypts the header also, so there is really no way to access the domain there. Once again, you will probably need to change the DocumentRoot to a Windows type directory.
Hope that helps.
Nothing needs to be done on the MT routers. I have three domains coming through mine right now.
OOPS! …and restart Apache for changes to take effect!