• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 378
  • Last Modified:

2 webservers, 1 port 80

All,

Is there any way to forward traffic with a known hostname to another server?

We are using IIS on a windows 2008R2 server, and also a linux server, for a php website (a whoiswho site).

For now the whoiswho site is public trough port 80.  But several websites on the IIS webserver needs to be public also.

I was thinking, isn't there any solution to forward traffic to the other local php server?  So i can make the IIS webserver public, and forward everything with hostname whoiswho.site.be to the linux php server?

We already tried to move the php site to the IIS webserver, but that doesn't work that good.


is there anybody with a great idea for me?
0
trivin
Asked:
trivin
  • 7
  • 3
1 Solution
 
Paul MacDonaldDirector, Information SystemsCommented:
Surely the two machines have different IP addresses.  That they both use port 80 is irrelevant.  Do they share the same domain name?
0
 
trivinAuthor Commented:
Jep, they have different IP addresses.
They share the same domain name, they are in the same local network.
0
 
Paul MacDonaldDirector, Information SystemsCommented:
Sorry, I meant do they have the same DNS name.

I must not be understanding the problem.  Do you only have one public IP address and you want to share that among many web sites?  If so, there's not good way to do that with DNS - you'll have to configure different port numbers for each site and have people use the port number to get to the site they want.

If you have multiple public IPs - if you have a public IP address for each web site - you don't have to do anything special with port numbers.

Either way, you need to configure your router to send traffic from the public side to the appropriate server on the inside.
0
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

 
trivinAuthor Commented:
Jep I know al that.
But users and port numbers, it's easier just trough port 80, so they don't have to remember ports.

The point is, i am moving my sharepoint websites from a sbs server with heavy load, to a seperate sharepoint server.  And some of them needs public access.  When I don't have a port free, I am stuck...

I hoped that their would be some way to connect the IIS server to the linux server, and do a relay for that hostname.
0
 
Paul MacDonaldDirector, Information SystemsCommented:
I don't know how you'd make that work.  You'd have two host names pointing to the same IP address, then using one web site to redirect to another, based on which host name was requested.  I won't say it's not possible, but it's certainly fraught with problems.  Easier, I think, to just provision an second IP address on the public side and assign it to the new web server.
0
 
trivinAuthor Commented:
I think it must be possible, but it's also beyond my knowledge.
But like you say, it could be a config with troubles.

I gonna ask on my provider for a second IP address, I hope they can provide me one more.

ey thansk for the advice!

0
 
trivinAuthor Commented:
I wait till tomorrow to close the treat, maybe some smart ms tweaker know something more...
0
 
d_nedelchevCommented:
Looks like you will have to set up a ReverseProxy.

The general idea is to redirect your public-IP:80 traffic to an internal machine running a Proxy server (such as Squid for inscance) which then will redirect the requests to the appropriate web server based on the URL. Naturaly you will also have to update your public DNS records to include the additional web sites. This of course is not so simple to configure but it will not require additional leased line with static public ip to work.
0
 
trivinAuthor Commented:
I called today my provider, and indeed I need an additional leasd line.
I want to try it first without the extra cost.

The reverseproxy is a good idea, thanks d_nedelchev!
Do you have experience with this?  Is it with a gui, or commandline?
I gonna setup a linux vm tomorrow, and install Squid.  I get back to here tomorrow.
0
 
trivinAuthor Commented:
It works!
I wasted 1 day of reading.  But now I know the basics.  Enough for reverse proxy.

This my setup:
VM with ubuntu 10.04 (it didn't work with the new one)
Squid 3.1.10
3 websites, 2 sharepoint sites (with authentication), and one php site.

squid.conf:

http_port 80 accel vhost defaultsite=www.web1.be ignore-cc
acl all src
acl our_sites dstdomain www.web1.be www.sharepoint1.be www.sharepoint2.be
http_access allow our_sites

cache_peer 192.168.1.8 parent 80 0 no-query originserver name=sharepointserver login=PASS
cache_peer 192.168.1.13 parent 80 0 no-query originserver name=wiw
cache_peer_domain sharepointserver www.sharepoint1.be www.sharepoint2.be
cache_peer_domain wiw www.web1.be

cache_effective_user user
cache_effective_group usergroup


That's it.
Thanks for the good idea's!


0
 
trivinAuthor Commented:
Oh, before I forgot, also configure the public dns settings to point to the IP of the proxy server.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 7
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now