Ubuntu: Apache Httpd backed by both Tomcat and PHP



Question:

After a bit of googling it turned out that this topic is not well described hence asking about it here.

What I have already: well setup & working system where:

  1. Apache Tomcat with main web-application is running on port 8080 and handling all requests like mycompany.com:8080/*
  2. Apache HTTPD 2.4.7 running on port 80 with PHP module and handling requests to WordPress-based blog at mycompany.com/blog

What I successfully achieved:

  1. Adding mod_jk connector and having Apache HTTPD routing all requests to Tomcat via 8009 port so that Tomcat is handling all requests like mycompany.com/*

What I would like to achieve:

  1. Apache HTTPD is intercepting all requests at port 80 and if url is /blog* then PHP5 module is intercepting it, otherwise everything else is handled by mod_jk connector i.e.

    /blog* -> PHP5 Apache module -> WordPress blog

    /* -> mod_jk -> Tomcat with web-application

Could you please advise if it's possible with minimum configuration of existing modules (without using modules like mod_rewrite or any other)?

Could you please elaborate regarding possible security holes of PHP module with such configuration since I'm not experienced with it?

Thanks a lot in advance for any help!


Solution:1

Answered the same question on StackOverflow and got an answer there: https://stackoverflow.com/questions/30935328/php-wordpress-blog-and-tomcat-on-same-server-is-it-possible/30938420#30938420


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »