Link to home
Start Free TrialLog in
Avatar of fugazer
fugazer

asked on

Using port 80 for 2 web servers.. How do i forward to each?

Hello,

I currently have the following setup:

IIS running on 192.168.100.2 port 80
Apache running on 192.168.100.2 port 8080

I have 2 sub domains which are used for me two web servers..

home.domain.com -> IIS
dev.domain.com:8080 -> Apache

I know how to put Apache on port 80.. I just need to give it a new IP address.. Say 192.168.100.3..

Problem is, how do i get dev.domain.com to reach that IP??

Thanks


Avatar of Henrik Johansson
Henrik Johansson
Flag of Sweden image

Start DNS-manager (dnsmgmt.msc), expand 'Forward lookup zones'->domain.com
Double-click on dev and change it to the correct IP-address.
Each IP address needs to be registered with the correct name in DNS - are you using Microsoft DNS or some third party?
Avatar of fugazer
fugazer

ASKER

yes i'm using DNS..

Before i make the change, i'm wondering if incoming traffic from dev.domain.com will route to the proper server??

So... home.domain.com will stay the same ->IIS Sharepoint
and dev.domain.com will now forward to -> Apache

Essentially the same appearance as i currently have expect now eliminating port 8080.

home.domain.com and dev.domain.com is two different DNS-records.
Updating dev will not affect home if not home is a CNAME pointing to dev.
If they're both A-records (host), just update dev to point on the correct IP.
If any of them is CNAME-record (alias) to the other's A-record, you nead to delete the CNAME-record and re-create it as A-record.
Avatar of fugazer

ASKER

well.. i made the switch

And what i was worried about happened..

i switched dev.domain.com over to 192.168.100.3 (A Record)

Internally on our network everything is fine..

But i had my friend access dev.domain.com and it brought him to our IIS server with sharepoint.

Internally it works, externally no go..

I have a router that sits before W2k3 server and Port 80 forwards off to IP 192.168.100.2

I also added another forward from port 80 to 192.168.100.3, but obviously that didn't work..

With port 80, and external traffic coming in on port 80, its either Sharepoint (192.168.100.2) or Apache (192.168.100.3)..

I'm i dead in the water?

The linksys wrt54g router has been upgraded with -> Firmware Version: v4.71.1, Hyperwrt 2.1b1 + Thibor15c

Is there some advanced setting i can do on the router to direct the traffic to the correct target?

Or is there some special W2k3 setting i can do?

You need two different firewall rules on the external network with two separate publically accessible IPs/domains.

ie you need a public DNS for 200.0.0.1 that is NATd to 192.168.100.2 and one for 200.0.0.2 that is NAT'd to 192.168.100.3.

Avatar of fugazer

ASKER

I uninstalled our NAT to get our 2 networks talking..

https://www.experts-exchange.com/questions/23653796/How-to-i-reach-IP-address-on-my-other-NIC.html


Frustrating...

Is the root of all my trouble's the router that sits before my W2k3??

Should the internet be plugged in directly to the windows server?




ASKER CERTIFIED SOLUTION
Avatar of smilerz
smilerz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fugazer

ASKER

So it is correct that i have the router before the windows server? I used this as my firewall, and access point for wireless notebooks..

NIC1 and NIC2 are bridged..

My goal is to eliminate the need for port 8080, and just have the 2 websites up and running..

dev.domain.com
home.domain.com

currently it is set up like this:
dev.domain:com:8080
home.domain.com


SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fugazer

ASKER

will that allow user's outside our network to access the apache webserver without having to write 8080 in the url?? ie.. http://dev.domain.com 
Yes, the user will only know about the port 80 address when using a proxy solution and all traffic to port 8080 is done through the proxy server listening on port 80.
Avatar of fugazer

ASKER

Okay.. i think i understand.

I've never set up a proxy before, and im a little confused on how to achieve the setup you suggested.
Avatar of fugazer

ASKER

i'm having trouble setting up the proxy configuration as you suggested Wizard.. do you have any more insight for me? Or even better, can you tell me how to do this?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial