Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Proxying SSL on Apache to HTTP on Jetty

On 09/01/2012 02:28, Jan Bartel wrote:
The more up-to-date documentation page is here:

However, they're probably not that much different. Download the
sources of jetty and take a look at the classes that implement the
Connector interface. You probably want to extend the class.

Thanks. I'm coming at this as a server admin, not a programmer - to me it seems very odd that you would actually have to write some code (even a small bit) to change something like this.

As it turns out, I've now found out that this does not need to be done. As well as picking up information from headers like X-Forwarded-Host, Jetty will also use X-Forwarded-Proto. mod_proxy will add all of the X-Forwarded fields you need except for this one, so simply adding:

RequestHeader set X-Forwarded-Proto "https"

into the relevant part of the apache config means that no code changes etc need to be done on jetty - and as a server admin that seems to me to be a much better approach that having to write, compile and install new clases etc... (just make sure that jetty has <Set name="forwarded">true</Set> in the connector config so that it uses the X-Forwarded fields)

This is working fine now, using Jetty 7.5.4 with nothing other than a few simple config file changes in Jetty and Apache.

Back to the top