• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

SSI of php file inside JSP, almost there.....

Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

As the title suggests I'm trying to do a server side include of a .php file in my jsp such that apache will run the php and of course tomcat handles the .jsp.

Here's what I've got so far:

httpd.conf in the section for my virtual server:

SetEnvIf Request_URI "/blog*" no-jk

<IfModule mod_jk.c>
JkMount /* ajp13


It basically appears that the

SetEnvIf Request_URI "/blog*" no-jk

line simply does not work.

the /blog directory is outside of my war in my apache document root. It holds .php and .css files for my wordpress blog.

Whenever I try to access a php file in the blog directory it tries to send the request to tomcat instead.

If I take out the SetEnvIf and instead put lots of "JkMount /*.XXX ajp13" where XXX is EVERY file extension EXCEPT for .php extension, then the .php files will run in apache perfectly and the SSI in my .jsp works -- however that means when the .php files run if they reference any .css or .js or images, it's going to send the request to tomcat under the base /appname directory, meaning now the relative paths to those files are broken (they live under /blog but because of the JkMount /*.css they now start looking in tomcat /appname).

Any idea what I could try to do in order to fix this?

Basically what I need is this:

a) directory "php" in my war file where apache will execute everything in that directory and


b) the wordpress /blog directory, that lives outside of my war, to have everything inside it be executed by apache and allowing all other stuff (except for what's in a) to be executed by tomcat.



With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic