[mapserver-users] Need help with ProxyPass configuration, please

Daniel Morissette dmorissette at mapgears.com
Mon Jun 8 07:36:27 PDT 2009


cbrydon wrote:
> I have also tried the following (among other configurations), but just can't
> seem to get thiings to work.... 
> 
> NameVirtualHost 111.111.111.111:80 
> 
> # Apache Site 
> <VirtualHost 111.111.111.111:80> 
> DocumentRoot "/ms4w/Apache/htdocs" 
> ServerName 111.111.111.111 
> </VirtualHost> 
> 
> # IIS Site 
> <VirtualHost 111.111.111.111:80> 
> ServerName 111.111.111.111:80 
> DocumentRoot F:/Applications/2009/Custom/SomeTown 
> ProxyRequests OFF 
> ProxyPass / http://111.111.111.111:8080/ 
> ProxyPassReverse / http://111.111.111.111:8080/ 
> </VirtualHost> 
> 
> 
> The above code doesn't work either; it seems as though the 2nd virtual host
> isn't being recognized. SomeTown is actually in F:/Applications/2009/Custom.
> Below is the output of an error log file. 
> 

Carl,

You need a single VirtualHost for what you're trying to do. You have to 
decide which directories go to the proxy'd (IIS) server and list them 
there, and then let the local (MS4W) server handle the rest.

For instance, if what you want is:

   http://111.111.111.111/SomeTown    -> IIS
   http://111.111.111.111/AnotherTown -> IIS
   http://111.111.111.111/ (anything else)  -> MS4W

Then a config as follows should do the trick:


NameVirtualHost 111.111.111.111:80

# Apache Site
<VirtualHost 111.111.111.111:80>
DocumentRoot "/ms4w/Apache/htdocs"
ServerName 111.111.111.111

# Forward some directories to the IIS server on port 8080
# Anything not explicitly proxy'd here is expected to be local by default.
ProxyPass        /SomeTown  http://111.111.111.111:8080/SomeTown
ProxyPassReverse /SomeTown  http://111.111.111.111:8080/SomeTown

ProxyPass        /AnotherTown  http://111.111.111.111:8080/AnotherTown
ProxyPassReverse /AnotherTown  http://111.111.111.111:8080/AnotherTown

</VirtualHost>


I hope that helps

Daniel
-- 
Daniel Morissette
http://www.mapgears.com/



More information about the MapServer-users mailing list