logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: [RESOLVED] mod_proxy subfolder exclude isn't working
Author
weiminlee



Joined: 21 May 2014
Posts: 2

PostPosted: Wed 21 May '14 23:34    Post subject: [RESOLVED] mod_proxy subfolder exclude isn't working Reply with quote

Hello,

I have installed 2.4.9 64-bit vc11 on Windows 2008R2 with mod_jk 1.2.39. I have mod_proxy and mod_proxy_http enabled. I have mod_jk to proxy Tomcat which is running Interwoven/Autonomy LiveSite Display Services.

I'm trying to proxy / to a subfolder in Tomcat, but I also need to exclude other folders from the proxy. I've tried all variations using the exclude(!) descriptor, but nothing seems to work. Below is my virtual host configuration.

Has anyone ever notice the proxy exclusion descriptor to not work?

<VirtualHost *:80>
ServerAdmin myemail
DocumentRoot "D:/Apache24/htdocs"
ServerName sitename.org
ServerAlias *.sitename.org
ErrorLog "logs/sitename.error.log"
CustomLog "logs/sitename.access.log" common
ProxyRequests off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /folder1/ http://127.0.0.1/html/siteroot/folder1/
ProxyPass /site-resources !
ProxyPass /site-assets !
ProxyPass / http://127.0.0.1/siteroot/

JkMount /* lsds_worker
</VirtualHost>

My access log show the following message with the above configuration...

srcIP - - [14/May/2014:08:30:05 -0700] "GET / HTTP/1.1" 502 379
127.0.0.1 - - [14/May/2014:08:30:05 -0700] "GET /siteroot/ HTTP/1.1" 502 391
127.0.0.1 - - [14/May/2014:08:30:05 -0700] "GET /siteroot/siteroot/ HTTP/1.1" 502 403
127.0.0.1 - - [14/May/2014:08:30:05 -0700] "GET /siteroot/siteroot/siteroot/ HTTP/1.1" 502 415
127.0.0.1 - - [14/May/2014:08:30:05 -0700] "GET /siteroot/siteroot/siteroot/siteroot/ HTTP/1.1" 502 427
127.0.0.1 - - [14/May/2014:08:30:05 -0700] "GET /siteroot/siteroot/siteroot/siteroot/siteroot/ HTTP/1.1" 502 439
127.0.0.1 - - [14/May/2014:08:30:05 -0700] "GET /siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/ HTTP/1.1" 502 451
127.0.0.1 - - [14/May/2014:08:30:05 -0700] "GET /siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/ HTTP/1.1" 502 463
127.0.0.1 - - [14/May/2014:08:30:05 -0700] "GET /siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/ HTTP/1.1" 502 475
127.0.0.1 - - [14/May/2014:08:30:05 -0700] "GET /siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/ HTTP/1.1" 502 487
127.0.0.1 - - [14/May/2014:08:30:05 -0700] "GET /siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/ HTTP/1.1" 502 499
127.0.0.1 - - [14/May/2014:08:30:05 -0700] "GET /siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/siteroot/ HTTP/1.1" 502 511

...the above just keeps appending until the server runs out of threads and I reboot apache.


Last edited by weiminlee on Tue 27 May '14 18:42; edited 1 time in total
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Mon 26 May '14 10:49    Post subject: Reply with quote

The excludes need to be set before the other proxypass rules
Back to top
weiminlee



Joined: 21 May 2014
Posts: 2

PostPosted: Tue 27 May '14 18:41    Post subject: Reply with quote

I was able to solve my requirement with the following...

<VirtualHost *:80>
ServerAdmin myemail
DocumentRoot "D:/Apache24/htdocs"
ServerName sitename.org
ServerAlias *.sitename.org
ErrorLog "logs/sitename.error.log"
CustomLog "logs/sitename.access.log" common

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

RewriteEngine on
RewriteRule ^/html/sitename/(.*) /$1 [L,R]
RewriteRule ^/sitename/(.*) /$1 [L,R]
RewriteRule ^/$ /default.page [L,R]

ProxyPreserveHost On
ProxyPassMatch ^/(.*\.page)$ http://127.0.0.1:1776/sitename/$1
ProxyPassMatch ^/folder1/(.*\.html)$ http://127.0.0.1:1776/html/sitename/folder1/$1

JkMount /* lsds_worker
</VirtualHost>
Back to top


Reply to topic   Topic: [RESOLVED] mod_proxy subfolder exclude isn't working View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules