#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    11
    Rep Power
    0

    IIS redirect to Apache at 192.168 on LAN


    Hi all,

    Having troubles with redirections FROM the Internet. All works fine on the LAN but from the Internet we cannot surf/reach the subdomain when using domain names in the browser. We can surf the subdomain via IP address.

    203.219.xx.xx - Win2k, IIS 5.0 server, Port 80 serves up our main website - domain.dom

    192.168.0.50 - Apache, Port 8090 serves up a subdomain - sandbox.domain.dom

    I created a new subdomain website in IIS and redirected it to http://192.168.0.50:8090 and opened up port 8090

    From the internet,
    We can surf the Apache webserver by IP ie: 203.219.xx.xx:8090.
    We cannot surf via FQDN ie: http://sanbox.ourdomain.dom
    The browser has a status message of contacting 192.168.0.50 before timing out.

    Inside the LAN everything works as expected with the single exception that the address returned into the browser changes from sandbox.ourdomain.com to http://192.168.0.50:8090

    How can I get the name resolution to work ?

    Is what I am attempting to do possible ?
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    11
    Rep Power
    0
    Just a bit more info...

    If we turn off the redirection in IIS and let our IIS webserver serve up the pages for the subdomain then the name resolution works fine. The name resolution only fails when we redirect the subdomain to the Apache box on the LAN.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    11
    Rep Power
    0
    OK. worked this out. Redirects in IIS are just amazingly limited. If we didn't have ASP pages we would dump IIS and go to Apache. Anyhow, here's our solution and it has worked for a week now without issue at about 5,000 hits a day on the IIS server and about 500-1,000 hits a day on the 192.168.0.50 server. There seems to be no performance hit although we aren't a busy website.

    1) We moved IIS to port 90. No need to open Port 90 on our firewall as no external IP's will ever connect directly to the IIS server. They will all be routed via the Apache server.
    2) Deleted the subdomain entry on the IIS server
    3) Turned off host headers. Actually we couldn't delete our customised host headers so we just deleted the main website entry in IIS and recreated it.
    4) Installed Apache 2 on port 80 on the main server
    5) Edited httpd.conf in Apache and added 3 things
    a) Listen 80
    b) ServerName ourdomain.dom:80
    c) added 2 virtual hosts to the config file as below.

    NameVirtualHost *

    # This 1st entry redirects to the IIS server on port 90
    <VirtualHost *>
    ServerName ourdomain.dom
    ProxyRequests off
    ProxyPass / http://our.ip.address:90/
    ProxyPassReverse / http://our.ip.address:90/
    </virtualHost>

    # This 2nd and final entry redirects to our Apache server on 192.168.0.50
    <VirtualHost *>
    ServerName subdomain.ourdomain.dom
    ProxyRequests off
    ProxyPass / http://192.168.0.50/
    ProxyPassReverse / http://192.168.0.50/
    </virtualHost>


    Just to be sure, we have rebooted the server a few times and this solution works without intervention.
    Last edited by IIS_dummy; December 6th, 2004 at 04:38 AM. Reason: Added 2 x extra details

IMN logo majestic logo threadwatch logo seochat tools logo