Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

ProxyPass within LocationMatch not working

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Apache/Windows/Port 80  
Author Message
user2988

External


Since: Oct 01, 2004
Posts: 3



(Msg. 1) Posted: Fri Oct 01, 2004 3:26 am
Post subject: ProxyPass within LocationMatch not working
Archived from groups: alt>apache>configuration (more info?)

Hi!

I am running two apache installations on port 80 (with php4) and 81 (with
php5).

Now I'd like to pass all files ending with .php5 from port-80-apache to
port-81-apache

I used the following configuration, but it didn't work:

<LocationMatch ".*\.php5$">
ProxyPass http://localhost:81/
</LocationMatch>

If I use "Deny from all" the files are locked. So the regular expression is
correct.
If I use <Location /php5> the request is forwarded. So the ProxyPass
expression is correct.

Does anyone know why this isn't working and what can I do to get it running?

thx,
Andreas

 >> Stay informed about: ProxyPass within LocationMatch not working 
Back to top
Login to vote
jring

External


Since: Jun 30, 2003
Posts: 154



(Msg. 2) Posted: Fri Oct 01, 2004 8:16 pm
Post subject: Re: ProxyPass within LocationMatch not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Andreas Hammerschmidt" <Andreas.Hammerschmidt.TakeThisOut@gmx.net> wrote in message news:<415c87c6$1@e-post.inode.at>...
 > Hi!
 >
 > I am running two apache installations on port 80 (with php4) and 81 (with
 > php5).
 >
 > Now I'd like to pass all files ending with .php5 from port-80-apache to
 > port-81-apache
 >
 > I used the following configuration, but it didn't work:
 >
 > <LocationMatch ".*\.php5$">
<font color=purple> > ProxyPass <a style='text-decoration: underline;' href="http://localhost:81/</font" target="_blank">http://localhost:81/</font</a>>
 > </LocationMatch>
 >
 > If I use "Deny from all" the files are locked. So the regular expression is
 > correct.
 > If I use <Location /php5> the request is forwarded. So the ProxyPass
 > expression is correct.
 >
 > Does anyone know why this isn't working and what can I do to get it running?

don't know, but let me get the swiss pocket knife:

RewriteEngine On
RewriteRule (.*\.php5)$ <a style='text-decoration: underline;' href="http://localhost:81/$1" target="_blank">http://localhost:81/$1</a> [P,L]

Joachim

PS: the docs are specifically talking abut a special case of using
ProxyPass inside a <Location> header - maybe they meant just that...<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: ProxyPass within LocationMatch not working 
Back to top
Login to vote
user2988

External


Since: Oct 01, 2004
Posts: 3



(Msg. 3) Posted: Sat Oct 02, 2004 5:54 pm
Post subject: Re: ProxyPass within LocationMatch not working (.php5 proxy redirection) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Joachim Ring" <jring.DeleteThis@web.de> schrieb im Newsbeitrag
news:3ae246c1.0410011616.7143c0f1@posting.google.com...
 > "Andreas Hammerschmidt" <Andreas.Hammerschmidt.DeleteThis@gmx.net> wrote in message
 > news:<415c87c6$1@e-post.inode.at>...
  >> Hi!
  >>
  >> I am running two apache installations on port 80 (with php4) and 81 (with
  >> php5).
  >> [...]
  >> Does anyone know why this isn't working and what can I do to get it
  >> running?
 >
 > don't know, but let me get the swiss pocket knife:
 >
 > RewriteEngine On
 > RewriteRule (.*\.php5)$ <a style='text-decoration: underline;' href="http://localhost:81/$1" target="_blank">http://localhost:81/$1</a> [P,L]
 >
 > Joachim
 >
 > PS: the docs are specifically talking abut a special case of using
 > ProxyPass inside a <Location> header - maybe they meant just that...

It's working now. Many thanks to you!

I had to change it a bit to work correctly, because your version generates
"GET //index.php5 HTTP/1.1" instead of "GET /index.php5 HTTP/1.1". So you
have to remove the / before $1.

My finally working version:
RewriteEngine On
ProxyPreserveHost On
RewriteRule (.*\.php5)$ <a style='text-decoration: underline;' href="http://localhost:81$1" target="_blank">http://localhost:81$1</a> [P,L]

All .php5 requests are now forwarded to the port-81-apache and the original
Hostname is preserved, so links generated by the PHP script link back to the
port-80-apache.

thx,
Andreas<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: ProxyPass within LocationMatch not working 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Dynamic ProxyPass - Hi all, I'm trying to set-up sub-directories on a web-site, that will act as a proxy to other web servers. I.e: /app/ ->http://app.internal/ /test/ ->http://test.internal/ /mail/ ->http://mail.internal/ I anticipate that I will be adding man...

ProxyPass / ProxyPassReverse - Hi there after reading the manual-pages on apache.org about the ProxyPass / ProxyPassReverse I don't understand the difference. How can I test it and see the difference ? On my own tests, I didn't found the goal ... Thanks Ruedi :-) ---..

Apache proxypass on RH 9 - I've just installed RH 9 and have apache up and running I've been reading about how to setup proxy passes and think i have it all figured out but i do not know where you get the proxypass mod. webmin shows that it is not installed. any help would be..

Location - proxypass/proxpassreverse - I want to add a location which has an ip address , which includes a port number ( not Port 80) eg 10.6.31.206:8765. However I'am unable to even browse (using the Konquera webbrowser) a website with a port number eg 10.6.31.205:222 any ideas ? Thanks ...

proxypass in virtual host only - Hi We have some troubles by migrating from apache 1.3 x to 2.x. We need to use proxypass inside a virtual host without giving anybody the possibility to use our web as a proxyserver. How can we disable mod_proxy global an activate it only within a..
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]