Re: [users@httpd] Reverse proxy by file ext / type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/8/06, Matt Richards <matt@xxxxxxxxxxxxx> wrote:
> Hello :)
>
> I have httpd running for a web interface to a like control site and all
> requests to access users files are reverse proxied to a windows box due
> to the requirment for asp support.
> Everything is working fine although I would just like to add support for
> perl scripts using mod_perl
>
> I have a freebsd box running on this network that has the ablity to
> parse perl files through mod_perl and apache, however, I dont want the
> users to have to goto a different address to just parse perl scripts so
> I would like to setup the already setup apache that is proxying
> everything to a given domain to the win box.
>
> I would like to set it up so if a request for a file with a ext of .pl
> it will get proxied to the freebsd box and not the win box.
> or .. i would like the same but for anything thats under
> http://domain/userid/perl/ but for every user.
>
> I would also like to keep the configuration as simple as possiable as it
> is already starting to get quite complicated.
>
> Does anybody know how this can be done?

RewriteEngine On
RewriteRule ^/(.*\.pl)$ http://perl-box.example.com/userid/$1[P,L]
RewriteRule ^/(.*) http://other-box.example.com/$1 [P]
ProxyPassReverse / http://other-box.example.com/

(Your problem isn't well-specified enough to do a complete
configuration, but that should give you an idea.)

Note that the ProxyPassReverse directive can only work for one of
those.  So you would need to be careful that the perl scripts didn't
generate redirects that need rewriting.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux