How can I use Tomcat non-blocking connectors (NIO or APR) and Apache Httpd together?

I am building a small web application in Spring, so I use Tomcat as my application server. The web application requires cometary connections, so I use Tomcat NIO as a connector. However, another part of the application needs to run the php bulletin board. I made settings where Apache httpd processes all requests and passes them to Tomcat using mod_jk only when necessary. Apache processes all static and php files.

However, it seems that Apache httpd cannot be used if Tomcat uses NIO or APR to service comet requests. Is there a way to get Tomcat to handle all requests and pass the Apache php requests that hangs with Tomcat? Or is there another proxy that I can use? Any ideas are welcome. Thank!

+3
source share
1 answer

You can route all your NIO comet connections through port 8080 and bypass apache in general, and then use apache 80 for your php.

I use Jetty for a comet, which is a really good choice for a comet, as it is a complete web server that can stand alone, so Apache is not needed.

Querces PHP Java, Apache, php.

, .

+3

Source: https://habr.com/ru/post/1784872/


All Articles