You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by dfelicia <do...@runbox.com> on 2006/08/03 01:14:13 UTC
[users@httpd] mod_proxy_ajp & static content
I've seen a few posts re: this topic, but don't quite get the solution...
I'm trying to use mod_proxy_ajp to pass only dynamic content to the servlet
engine (*.jsp), while allowing Apache to serve static content. the catch,
of course, is that the URL has to be the same for both.
So,
http://myserver/myapp/my.jsp -> route to Tomcat
http://myserver/myapp/my.gif -> serve via Apache
This is quite easy to accomplish using mod_jk, but Apache 2.2 seems to
prefer mod_proxy_ajp.
I'm not an Apache expert, and could really benefit from an example,
especially if mod_rewrite comes into the picture as part of the solution.
Also, assuming there is some magic to make this work, will it perform as
well as mod_jk?
--
View this message in context: http://www.nabble.com/mod_proxy_ajp---static-content-tf2042892.html#a5624248
Sent from the Apache HTTP Server - Users forum at Nabble.com.
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] mod_proxy_ajp & static content
Posted by dfelicia <do...@runbox.com>.
Got it working. Here's how I did it:
<Directory "/foo/bar">
Options FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /bar "/foo/bar"
RewriteEngine On
RewriteRule ^/bar/(.*)\.jsp$ ajp://127.0.0.1:45002/bar/$1.jsp [P]
RewriteRule ^/bar/(.*)\.jsv$ ajp://127.0.0.1:45002/bar/$1.jsv [P]
RewriteRule ^/bar/(.*)\.jsw$ ajp://127.0.0.1:45002/bar/$1.jsw [P]
--
View this message in context: http://www.nabble.com/mod_proxy_ajp---static-content-tf2042892.html#a5635466
Sent from the Apache HTTP Server - Users forum at Nabble.com.
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] mod_proxy_ajp & static content
Posted by dfelicia <do...@runbox.com>.
When I try to insert a ProxyPass directive inside a LocationMatch, Apache
fails to start - syntax error.
I'm really hoping for an example, here. I'm wading through the doc, but am
not coming up with a solution.
--
View this message in context: http://www.nabble.com/mod_proxy_ajp---static-content-tf2042892.html#a5630941
Sent from the Apache HTTP Server - Users forum at Nabble.com.
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] mod_proxy_ajp & static content
Posted by Nick Kew <ni...@webthing.com>.
On Thursday 03 August 2006 00:14, dfelicia wrote:
> http://myserver/myapp/my.jsp -> route to Tomcat
> http://myserver/myapp/my.gif -> serve via Apache
>
> This is quite easy to accomplish using mod_jk, but Apache 2.2 seems to
> prefer mod_proxy_ajp.
Look up <LocationMatch> in TFM.
This looks like something that should be in the FAQ.
--
Nick Kew
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org