Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Server question - one IP, two hosts...

Posted on 2008-11-20
9
Medium Priority
?
463 Views
Last Modified: 2013-12-23
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?


0
Comment
Question by:level9wizard
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 7

Expert Comment

by:dkarpekin
ID: 23004203
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
 
LVL 3

Expert Comment

by:srepphan
ID: 23004216
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
 
LVL 7

Accepted Solution

by:
dkarpekin earned 2000 total points
ID: 23004256
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 11

Author Comment

by:level9wizard
ID: 23008575
Currently linuxbox.dyndns.com:81 works fine but I'm really hoping not to have to type in :81

Any thoughts?
0
 
LVL 3

Expert Comment

by:srepphan
ID: 23009080
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
 
LVL 1

Expert Comment

by:pathsniffer
ID: 23010092
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
 
LVL 11

Author Comment

by:level9wizard
ID: 23012562
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
 
LVL 3

Expert Comment

by:srepphan
ID: 23013046
Actually, pathsniffer has the easiest solution to this problem.
0
 
LVL 62

Expert Comment

by:gheist
ID: 23045771
You have to set up NameVirtualHost and the virutal host for XP should employ proxy module.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Make the most of your online learning experience.
In this article, the configuration steps in Zabbix to monitor devices via SNMP will be discussed with some real examples on Cisco Router/Switch, Catalyst Switch, NAS Synology device.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question