[mapserver-users] Web Server Tricks... Kind of Off Topic

Stephen Woodbridge woodbri at swoodbridge.com
Tue Jun 4 20:15:38 EDT 2002


I know this server is IIS, but but a very simple solution using Perl or
PHP might be work well for you. I sure you could do this same thing in
IIS with ASP, but I'm not sure how to do it.

The basic concept is to you the incoming request to form a new request
to an other server that is running mapserver which was your original
stated goal.

For example in PHP you can do something like

   $my_http_request = "http://local_server/my_app/?" . $QUERY_STRING;
   readfile($my_http_request);

which would grab the get params passed to this script and forward them
to the new url. The output of the forwarded page is return my readfile()
to the stdout which gets sent to the user's browser.

So your main web server is doing nothing but copying data from one
handle to another.

Some issues with this setup are, that you would want to configure
mapserver or mapscript to return images on stdout as the browser will
not have access to the mapservers file system for images.

You can do a similar thing in Perl and I am guessing that you can do
this via ASP also, but I'm not sure how.

This would let you put up specific pages and forward them to another
server. This will work even if you can't get the sysadmins to setup port
forwarding or IIS proxy forwarding which would make the issue of files
above more transparent.

-Steve



More information about the mapserver-users mailing list