0
votes

Run a simple jetty docker container:

docker run --rm -it -p 8080:8080 jetty:9.4

Request the root WebApp URL:

curl -I http://localhost:8080

Response, as expected, is 404, since there is no root WebApp:

HTTP/1.1 404 Not Found Cache-Control: must-revalidate,no-cache,no-store Content-Type: text/html;charset=iso-8859-1 Content-Length: 317 Server: Jetty(9.4.11.v20180605)

Now start a jetty docker container with the proxy module enabled:

docker run --rm -it -p 8080:8080 jetty:9.4 --module=proxy

Request the same Root URL:

curl -I http://localhost:8080

Response is HTTP 502 Bad Gateway:

HTTP/1.1 502 Bad Gateway Cache-Control: must-revalidate,no-cache,no-store Content-Type: text/html;charset=iso-8859-1 Server: Jetty(9.4.11.v20180605) Content-Length: 321

Why? I cannot get a jetty docker container running the proxy module to serve any webapps or content. Running: Docker Version 18.06.1-ce-mac73 (26764)

1

1 Answers

0
votes

Proxy module is for Jetty itself to act as a proxy to another webserver.

Just enabling it results in an empty configuration where it has no destination to talk to, hence the 502 Bad Gateway.