Koozali.org: home of the SME Server

URL Forwarding to windows 2000 IIS from Linux SME Server 7.1

vsstephen

SME Server 7.1 URL Forwarding

Above 3 URL having same public addresses and listen to port 80.
At present which I reside under IIS. Because of the new web server
Arrival I need to share the SDSL line with them. After SME Server
Installation they have their own domain name which Is already in the
Domain list. What I intend to do in order to share my One SDSL line for
Everyone. I thought to make Linux SME server as a web server, which I want
to make to be a common server. I thought to use a URL redirection feature
which is available in the IIS. So I configure the SME Server create a new domain and
that is I-message.com and create a hostnames and address using server-manager. Following is my current list. Grey highlighted row showing that I wanted to redirect the
url ww.i-message.com to 192.168.4.54 from 192.168.4.240. in the windows 2000 IIS still the three URL assigned to the local ip 192.168.4.54 address and listening port 80.

My Question here why I cant able to redirect the url www.i-message.com from 192.168.4.240 to 192.168.4.54, please any one help me to solve this issue. I am very new bee to linux.

Offline mmccarn

  • *
  • 2,656
  • +10/-0
URL Forwarding to windows 2000 IIS from Linux SME Server 7.1
« Reply #1 on: June 08, 2007, 03:31:18 PM »
URL redirection only works if both the original URL and the re-directed URL are directly available to the client computer.

So, if your router sends traffic on port 80 to the win2000 system, you'll need to use a different port number to send any traffic to your SME system - then include the port number in the redirec URL.

Additionally, if you want the redirection to work on your INTERNAL network, you will also need to create port forwarding rules on the SME box to forward your new port to the SME server's port 80.

So:

1) create a rule in the router sending traffic on port 88 to port 80 on the SME
2) create a rule in the SME forwarding traffic on port 88 to localhost port 80
3) tell your win2000 box to forward to http://sme-url:

vsstephen

If you could teach me how to set all the 3 url in SME server
« Reply #2 on: June 09, 2007, 10:43:38 AM »
Thanks for your reply. May be the way I post my question might confuse you mr. mmccarn . What I intent to do exactly vice versa to your proposal. At present router forwarding port 80 to windows 2000 server PC. What I actually intend to do is I want to ask my router to forward port 80 to new SME server under the same network. And from SME server I want to make that as a web server. Both computers are located in the same network listening to same public IP. If you could teach me how to set all the 3 url in SME server and redirect one of the URL to windows 2000 local pc because it is an asp web site.  Expecting help sir.

Offline mmccarn

  • *
  • 2,656
  • +10/-0
URL Forwarding to windows 2000 IIS from Linux SME Server 7.1
« Reply #3 on: June 09, 2007, 03:46:20 PM »
This is the same problem in reverse...

1) Configure your win2000 system to "listen" on some other / extra port (I'll use "88" as an example) on the site you plan to leave on Win2000 (www.e-navigator.com).

2) Open your firewall to allow port 88 to the win2000 system

3) Test internal and external access to the win2000 system (www.e-navigator.com) on port 88

4) Create 'e-navigator.com' as a 'Domain' on the SME box.  Assign it to an ibay that contains a simple html redirect to send users to www.e-navigator.com:88.  Your router will send the re-directed request to the win2000 box due to the port 88 request.

5) re-program the router to send port 80 traffic to the SME server

Defining domains on the SME box (system-manager:Configuration:Domains:Add_domain) causes SME to add a corresponding 'virtualdomain' section to /etc/httpd/httpd.conf.  The content for this virtualdomain will be served from the ibay specified when you create the domain.

Internally, you will want "www.e-navigator.com" to resolve to the Win2000 system; If you want to be sure that internal and external users are getting as close as possible to having the same browsing experience, remove port 80 from the "www.e-navigator.com" and create a new website that answers for this site on port 80 that redirects to port 88 (preferably using the exact same file you're using on the SME).

Since you need 'www.e-navigator.com' to resolve to the win2k host internally, you may want to create a "test" domain (e.g. 'nosuchdomain.com')  on the SME box that uses the same ibay as 'www.e-navigator.com' - Then you can test your html redirect internally by browsing to http://www.nosuchdomain.com -- it should redirect you to http://www.e-navigator.com:88

Have you ever heard of the Mono project?  Mono allows ASP hosting on linux: http://www.mono-project.com/Main_Page

Offline hgomez

  • **
  • 36
  • +0/-0
    • http://www.isfalpiz.com.ve
Re: URL Forwarding to windows 2000 IIS from Linux SME Server
« Reply #4 on: June 27, 2007, 09:51:18 PM »
Quote from: "vsstephen"
SME Server 7.1 URL Forwarding

Above 3 URL having same public addresses and listen to port 80.
At present which I reside under IIS. Because of the new web server
Arrival I need to share the SDSL line with them. After SME Server
Installation they have their own domain name which Is already in the
Domain list. What I intend to do in order to share my One SDSL line for
Everyone. I thought to make Linux SME server as a web server, which I want
to make to be a common server. I thought to use a URL redirection feature
which is available in the IIS. So I configure the SME Server create a new domain and
that is I-message.com and create a hostnames and address using server-manager. Following is my current list. Grey highlighted row showing that I wanted to redirect the
url ww.i-message.com to 192.168.4.54 from 192.168.4.240. in the windows 2000 IIS still the three URL assigned to the local ip 192.168.4.54 address and listening port 80.

My Question here why I cant able to redirect the url www.i-message.com from 192.168.4.240 to 192.168.4.54, please any one help me to solve this issue. I am very new bee to linux.


Very Easy:

1.-
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/

2.-
pico 99www.i-message.com

paste this:

<VirtualHost www.i-message.com:80>
    ServerName www.i-message.com
    ServerAlias www.i-message.com

    ProxyPass / http://192.168.4.54/
    ProxyPassReverse / http://192.168.4.54/

</VirtualHost>

<VirtualHost www.i-message.com:443>
    ServerName www.i-message.com
    ServerAlias www.i-message.com

    ProxyPass / http://192.168.4.54/
    ProxyPassReverse / http://192.168.4.54/

</VirtualHost>    

3.- Save an update apache.

/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
service httpd graceful
"No One Will Ever Need More Than 640K Ram"
                                                                              Bill Gates, 1981
......

Offline raem

  • *
  • 3,972
  • +4/-0
Re: URL Forwarding to windows 2000 IIS from Linux SME Server
« Reply #5 on: June 27, 2007, 10:54:01 PM »
vsstephen

proxypass will forward http requests for a valid domain on your sme server to another web server (which I believe is what you require).

sme has command line support for this, see this bug for details
http://bugs.contribs.org/show_bug.cgi?id=1612

It basically says to do:
db domains setprop internal.test.gormand.com.au  \
TemplatePath ProxyPassVirtualHosts \
ProxyPassTarget http://192.168.42.1/papers/

expand-template /etc/httpd/conf/httpd.conf

/etc/init.d/httpd-e-smith restart

Note: replace internal.test.gormand.com.au with your domain to be proxypassed
replace http://192.168.42.1/papers/ with http://IP/location of your other web server


There is also a proxypass contrib that adds a server manager panel
smeserver-proxypass-0.0.3-1.noarch.rpm
available from
http://www.saco-support.de/index.php?_m=downloads&_a=viewdownload&downloaditemid=7&nav=0,3#

It is buggy, and requires a manual fix relating to an incorrect db location specified in the custom template:
/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts/50ProxyPass

The database location should be specified as
/home/e-smith/db/domains

The original contribs custom template fragment reads

tie my %domains, 'esmith::config', '/home/e-smith/domains';

but it should read
tie my %domains, 'esmith::config', '/home/e-smith/db/domains';
...

penguinzrool

URL Forwarding to windows 2000 IIS from Linux SME Server 7.1
« Reply #6 on: July 16, 2007, 01:16:57 AM »
Hi guys,

First up, very useful thread - thanks for that last reply RayMitchell. I'm in a similar, though perhaps more complicated situation, and am almost there but not quite!

Basically I've just installed an additional SME box on my network and want to pass some of the duties from the original server to the new one. The original is a server and gateway while I just set up the new one in server only mode. I've got a couple of ibays, each with different virtual domains, on the original server and want to move some of these to the second.

For example, if I go to http://www.domain1.com I want to get the corresponding ibay on the first server, but http://www.modifier.domain1.com going to the second server. With the ProxyPass contrib I can get this to work, but the second server doesn't seem to be picking up on which ibay to use - it just gives the primary one. I've tried putting http://<ip>/ibay into ProxyPass but with no luck.

This wouldn't be a problem apart from the fact that I'm hoping to also migrate http://www.modifier.domain2.com to the second server and would quite like a different ibay for it!

Thanks in advance!
Chris.

penguinzrool

URL Forwarding to windows 2000 IIS from Linux SME Server 7.1
« Reply #7 on: July 16, 2007, 01:20:16 AM »
I just noticed, rather oddly, with http://<ip>/ibay in ProxyPass, opening http://modifier.domain.com works fine locally while http://www.modifier.domain.com calls the default ibay and externally you get the default ibay for both.

Weird...