Server question - one IP, two hosts...

SOME BACKGROUND:

I have two machines: one running Windows XP and one running Debian, these run WAMP and LAMP respectivly.

Before I introduced the Linux box to the network, I was solely running WAMP with a single IP from my ISP. I used DynDNS to register a domain to point to this IP. Example windowsxp.dyndns.com . Now I have registered a new domain linuxbox.dyndns.com (keep in mind these are example domains).


MY QUESTION/CHALLENGE:

What I'm trying to do, is simply have the windowsxp.dyndns.com domain go to the WAMP box (say, 192.168.0.111) and the linuxbox.dyndns.com goto LAMP (say, 192.168.0.222). I'm guessing I will need a new entry in my router b/c right now port 80 is forwarded to 192.168.0.111. Will I need a new entry say, port 81 to 192.168.0.222 and will I need to do this at the apache level as well, say, in the .conf?


LVL 11
level9wizardAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dkarpekinCommented:
Posting network diagram should really help.
Also IP set - from WinXp  CMD "ipconfig -all", router config, model.
More likely, if router will aloow , you need config NATig, or try get Static IP, not to mess with router config ,a s well DynDns.
If it is not an option- reaserach your registrator option,  to assign x.x.x.x:81 to the DNS record, and so on, their tech support might help you best.
0
srepphanCommented:
Assuming you have one public IP address and both servers are serving on the same port(s). I.E. both are listening for http connections on port 80, your router must be able to forward based on host headers. Most will not do this.
Your best bet is to set each box to listen on unique ports and use port forwarding in your router to direct traffic to the correct server.

You may also use port triggering if your router supports it so that you do not have to reconfigure the servers to listen on different ports. For example, the router will direct port 80 to 192.168.1.2:80, and port 81 to 192.168.1.3:80.
0
dkarpekinCommented:
You always can simply change web port to 81, and do with registrstor DNS name to x.x.x.x:81.
This way you willnot need NAT.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

level9wizardAuthor Commented:
Currently linuxbox.dyndns.com:81 works fine but I'm really hoping not to have to type in :81

Any thoughts?
0
srepphanCommented:
The only way to avoid typing that in is to get a router(or build one) that will recognize the host header and route appropriately. Your DNS registrar may be able to provide redirection services. I doubt it, but some offer this service.

Another solution would be to set up your own DNS server and provide redirection that way.

0
pathsnifferCommented:
Simplest solutions is to let the WAMP box handle the host headers. Then write a simple HTML/Javascript redirection to LAMP box.
i.e. winbox.yourdomain.com -> redirects to -> linbox.yourdomain.com:81.

That ways you do not have to type linbox.yourdomain.com:81 and save you from implementing a complicated setup.

Hope it helps
0
level9wizardAuthor Commented:
pathsniffer,

Thanks; yes this is a possibility and I was aware. However I was really hoping for a more direct solution. Either a solution in the router ports that talks to the Listen ports on apache between wamp and lmap or something similar.

If I did go your router, I'd probably use a <?php header() ?> redirect. Thanks none the less.
0
srepphanCommented:
Actually, pathsniffer has the easiest solution to this problem.
0
gheistCommented:
You have to set up NameVirtualHost and the virutal host for XP should employ proxy module.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.