Tim Holloway wrote:The proxy port is 8009 in the out-of-the-box server.xml. That's what you want to target in your proxy config in httpd. It's automatically useful "as is" with no configuration needed.
Not for me. Debian Squeeze's install comments that out.
I commented it in, and tried it both with and without the proxyName and proxyPort
Browser trying to use it gets a 500 internal server error,
the apache log looks like:
[Fri May 11 19:34:42 2012] [notice] Apache/2.2.16 (Debian) mod_jk/1.2.30 configured -- resuming normal operations
[Fri May 11 19:34:50 2012] [warn] proxy: No protocol handler was valid for the URL /webapi. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
Any pointers or ideas as to what I am doing wrong greatly appreciated.
I don't know where you got proxy name and port 80 from. I think you're mixing in some other proxy mechanism entirely - probably one going in the wrong direction and intended for an entirely different use. My connector is as follows:
And my proxy directive in Apache is:
Note that the proxy protocol is "ajp" and not http.
I didn't need the proxy host and port options, since I was using the defaults (localhost, port 80). Item #6 on that page is confusing, however. It doesn't actually mean you can proxy to port 8080, it means that incoming direct requests to port 8080 AND incoming proxied requests coming in on port 8009 are treated identically.
They also unfortunately didn't provide a complete Connector directive, but I suspect that it wouldn't have included the AJP setting in my example. AJP might simply be an anachronism at this point.
To eliminate your HTTP 500 error, make sure that the Apache HTTP config also includes a LoadModule for the proxy. There is a prototype proxy master config file in the CentOS distro that does that and it's where I got my model proxypass statements from. It looks like this:
I also have a "SSLProxyEngine on" directive to ensure that SSL gets proxied as well.
Tomcat6 is OK. But you're talking Debian-style Apache config and the Red Hat/CentOS/Fedora configs (which is what I'm referencing) aren't quite so civilized, alas. As long as you can find a module switch-in to do the LoadModule, use it. If not, make one of your own.
subject: Where does the <Connector> config information go?