Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I need to set up a small ASP site (running on IIS) on a private LAN *and* have it acessible via a public page on an Apache server which is also the LAN's firewall box:

|IIS on Win2k server box|-----|Apache on RH7.1|---->Net

Running ChiliSoft ASP is not an option unfortunately and neither is connecting the Win2k box to the Net instead of the RedHat7 one. When a visitor opens the www.domain.com, they have to see a page served up by the Apache server and the IIS machine is not allowed to be connected to by the outside world.

So I want to know - is there a way of making a page with perl behind it that runs on Apache and serves up the ASP pages from the IIS server transparently. In an ideal (i.e. fictional) world, the user would login on entering the Apache site, and then get sent to a blah.pl which acts as if they have connected directly to the default.asp on the IIS machine. They would then be able to run queries etc. transparently via the perl script.

Is this an impossible ask?

If so, just say so, I am below perl newbie status and will not feel hurt if you tell me it's out of the question.

  • Comment on Private ASP page from a public Apache page

Replies are listed 'Best First'.
Re: Private ASP page from a public Apache page
by echo (Pilgrim) on Aug 18, 2001 at 04:10 UTC
    This is definitely possible... you want Apache to act as a reverse proxy. For example to have all .asp files processed by the back end IIS server, you would set up something like:
    RewriteEngine  on
    RewriteRule    ^/(.*\.asp)$ http://iis/$1 [P,L]
    

    Replace iis with your IIS server's hostname. You'll need to have Apache compiled with mod_rewrite and mod_proxy for this to work.

    For simpler proxying you can check out the ProxyPass directive.

      Wowzers!

      You are fantastic!

      Hehehe, you even phrased my question better than me!

      Thanks a lot for your help,

      SEoD