ajp

WebSockets through Apache and Tomcat: HTTP upgrade is not supported by the AJP protocol

跟風遠走 提交于 2019-12-08 17:57:49
问题 I am developing with WebSockets, and made a working web application running on Tomcat 8. However, when testing with Apache 2 in front of it, the client is getting an HTTP 500 and the Tomcat log says: java.lang.UnsupportedOperationException: HTTP upgrade is not supported by the AJP protocol at org.apache.coyote.ajp.AbstractAjpProcessor.action(AbstractAjpProcessor.java:587) at org.apache.coyote.Request.action(Request.java:379) at org.apache.catalina.connector.Request.upgrade(Request.java:1886)

tomcat ajp connector with multiple webapps

流过昼夜 提交于 2019-12-07 18:21:42
问题 I have a tomcat server, with a webapps/ROOT application, fronted by Apache. LoadModule proxy_ajp_module modules/mod_proxy_ajp.so and ProxyPass / ajp://localhost:8009/ ProxyPassReverse / ajp://localhost:8009/ I need to add a second webapp to this box, so I unpacked it into webapps/pib.war/ and changed the Apache conf: ProxyPass /pib http://localhost:8009/pib ProxyPassReverse /pib http://localhost:8009/pib ProxyPass / ajp://localhost:8009/ ProxyPassReverse / ajp://localhost:8009/ My tomcat/conf

Subdomain under Apache to proxy into Tomcat

陌路散爱 提交于 2019-12-06 10:50:59
问题 I'm having trouble with making a subdomain to my Windows computer while using AJP to proxy to Tomcat. This is what I have in my httpd.conf file: <VirtualHost *:80> ServerName subdomain.localhost ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / ajp://localhost:8009/folder/ ProxyPassReverse / ajp://localhost:8009/folder/ <Location /> Order allow,deny Allow from all </Location> </VirtualHost> The subdomain has been added to `c:\windows\system32\drivers\etc\hosts

tomcat ajp connector with multiple webapps

我们两清 提交于 2019-12-06 01:51:30
I have a tomcat server, with a webapps/ROOT application, fronted by Apache. LoadModule proxy_ajp_module modules/mod_proxy_ajp.so and ProxyPass / ajp://localhost:8009/ ProxyPassReverse / ajp://localhost:8009/ I need to add a second webapp to this box, so I unpacked it into webapps/pib.war/ and changed the Apache conf: ProxyPass /pib http://localhost:8009/pib ProxyPassReverse /pib http://localhost:8009/pib ProxyPass / ajp://localhost:8009/ ProxyPassReverse / ajp://localhost:8009/ My tomcat/conf/server.xml contains: <Service name="Catalina"> <Connector port="8009" protocol="AJP/1.3" /> <Engine

Grails 2.1.0 app tomcat 7.0.22 Session empty after redirect

99封情书 提交于 2019-12-05 22:45:15
I am just learning grails and have a problem with an app that works fine when I run it in Netbeans but shows strange behavior when deployed to Tomcat 7.0.22 on a Centos 5.4 server. I am using the proxy_ajp to make the app available with apache. The problem seems to be with the session not being maintained after a redirect so that I lose the login information causing the app to try to login again. My proxy_ajp settings are <Location /PreyerBooks > ProxyPass ajp://localhost:8011/PreyerBooks ProxyPassReverse ajp://localhost:8011/PreyerBooks </Location> the app is deploying without errors and the

Forward REMOTE_USER to tomcat via AJP (e.g. for shibboleth)

血红的双手。 提交于 2019-12-05 12:06:20
Today I just got stuck with the following problem: 1. I configured apache for basic authentication (require valid user); which worked. 2. I further configured apache to forward requests for some path (/idp in my case) to a tomcat servlet (shibboleth IDP). The result was, that the shibboleth IdP (ECP profile) told me there was no "REMOTE_USER" set (it's using the httpRequest.getRemoteUser() method to check this; it returned null). I tried a lot of things like SetEnv and RewriteRule stuff, but without success. The solution is quite simple, but rather hard to find... so I decided to post it here

Implementation of AJP protocol in Java

孤人 提交于 2019-12-05 10:50:37
From Apache, you can use the "mod_jk" module to send HTTP requests to Tomcat using the "AJP" protocol, which is far more efficient that HTTP itself. I want to do the same, but from a Java program. I want to use "AJP" because of its good performances (and Tomcat is not bad after all). Does someone know about a Java implementation of the client side of "AJP" ? Doesn't the tomcat-ajp.jar present in %TOMCAT_HOME%/server/lib have the AJP implementation? There's open source Apache ajp-client available if someone needs it: This is a java implementation of an ajp13 client, allowing to send requests to

ProxyPass, ProxyReverse vs AJP

戏子无情 提交于 2019-12-03 07:15:54
问题 I currently have a Tomcat + Apache HTTP server setting to serve my Java servlet: ProxyPass /myservice http://localhost:8080/myservice ProxyPassRerverse /myservice http://localhost:8080/myservice This is all fine except that myservice needs to know the client IP address, which always turns out to be 127.0.0.1 due to the proxy. Is there a solution to get the real IP address? Is AJP an option? doGet(HttpServletRequest request, HttpServletResponse response){ request.getRemoteAddr() } 回答1: Do it

ProxyPass, ProxyReverse vs AJP

对着背影说爱祢 提交于 2019-12-02 20:46:48
I currently have a Tomcat + Apache HTTP server setting to serve my Java servlet: ProxyPass /myservice http://localhost:8080/myservice ProxyPassRerverse /myservice http://localhost:8080/myservice This is all fine except that myservice needs to know the client IP address, which always turns out to be 127.0.0.1 due to the proxy. Is there a solution to get the real IP address? Is AJP an option? doGet(HttpServletRequest request, HttpServletResponse response){ request.getRemoteAddr() } Do it like this: in the apache config: <Location /foo> ProxyPass ajp://localhost:8009/foo ProxyPassReverse ajp:/

Shibboleth SP - Reading assertion attributes from Java

好久不见. 提交于 2019-12-02 19:40:57
问题 I understand that configured attributes will be stored as environment variables by default and will be accessible like request.getAttribute("Shib-Identity-Provider") I tried that and after some googling I understood that to access them in Java through AJP. I need to prefix this <ApplicationDefaults id="default" policyId="default" entityID="https://idp.example.org" REMOTE_USER="eppn persistent-id targeted-id" signing="false" encryption="false" attributePrefix="AJP_"> I did that but I still