Koozali.org: home of the SME Server

web pages two servers

rcpettit

web pages two servers
« on: April 03, 2005, 05:29:18 AM »
I have two SME 6.5RC1 servers running with their own websites.  How do I get my domain name to point to the correct website on the correct server.  Both computers are behind a router with static addresses 192.168.1.2 and 1.3.

gbaird

your website pages & server
« Reply #1 on: April 03, 2005, 05:54:12 PM »
More info would help but here's a shot

domain name record from your dns provider points to your router ip address ---not the private side address but the address your isp has given it --- if it is dynamic it will change once in awhile

your router firewall setup directs all www or port 80 traffic to the ip of the box you want as your web server, set all other services the same way such as mail, ftp, ect

you can also just open the dmz in your router to point to the server your want visible to the outside world

---read your router manual---

boss_hog

web pages two servers
« Reply #2 on: April 03, 2005, 06:02:15 PM »
Hey rcpettit,
I would recommend to get a hold of Darrell May's contrib:
dmc-mitel-proxypass-0.0.1-3.noarch.rpm
Install it on one of the servers.
This will allow you to bring all requests to ONE server from the "public-ip.com:80". From there you would tell ProxyPass which internal ip address to send which request.

ProxyPass installs a nice simple Server-Manager Panel to help us novice's.
As a side note, I believe this Proxy feature is now a part of the SME 7.0(upcoming) release default install.
Good Luck.
Joe

gbaird

correction
« Reply #3 on: April 03, 2005, 06:18:21 PM »
bosshog wrote

I would recommend to get a hold of Darrell May's contrib:
dmc-mitel-proxypass-0.0.1-3.noarch.rpm
Install it on one of the servers.
----------------------------------------

---Problem is how will the router KNOW which server you installed proxypass - routers are poor at guessing

YOUR router directs all of your network traffic

this is why they call it a router I guess

The router is the key to proper network function

boss_hog

web pages two servers
« Reply #4 on: April 03, 2005, 07:08:22 PM »
Hey gbaird,
A router is what gives you the ability to take private address space ex:192.168.1.0 and route it to the internet.
If I understood rcpettit correctly, he/she seemed to have one public IP address but has mutiple domains behind it(the public ip via the router).
If two requests from the internet both point to http://public-ip.com the request comes in on port 80, unless you set-up a DNS record to change the port of one of the domains. If this is true, then both come to the public ip on port 80.

Set the router to point all http://public.ip.com:80 to the SME server with ProxyPass installed, tell this server to point any DNS specific requests to one of the two servers.

Example:
Two domains: domain-one.com and domain-two.com, in DNS both point to Public Ip of 123.123.123.123;
Router Public Ip:123.123.123.123
Router Private Ip:192.168.1.1
First SME Server:192.168.1.2 is domain-one.com
Second SME Server:192.168.1.3 is domain-two.com
Set Router to Forward 123.123.123.123:80 to 192.168.1.2
Set up First SME Server with ProxyPass
Set up ProxyPass to forward domain-two.com requests to  192.168.1.3
This is my very simple understanding of this arrangement. I have used this set-up in the past. If anyone else can explain it better, by all means, please do.
Hope this helps
Joe

rcpettit

web pages two servers
« Reply #5 on: April 04, 2005, 12:31:08 AM »
Thanks for the help.  I'll give that a try tonight.

Shoaib

web pages two servers
« Reply #6 on: April 04, 2005, 08:21:42 AM »
IMHO i would suggest to get another static IP from your service provider. I'm sure your router can handle multiple IPs.  :idea: