title: apache reverse proxy in docker
body: <p>I am currently trying to learn to use docker and I ran into a small problem with reverse proxy and apache.</p>
  
  <p>So I have a container running jenkins/jenkins:latest on port 8080 and I want to map it to /jenkins on port 80 with apache. This is my current proxy config:</p>
  
  <pre><code>ProxyPass         /jenkins  http://jenkins:8080/jenkins nocanon
  ProxyPassReverse  /jenkins  http://jenkins:8080/jenkins
  ProxyRequests     Off
  AllowEncodedSlashes NoDecode
  </code></pre>
  
  <p>And with this it redirects the first request to the jenkins container but jenkins redirects to /login which causes a 404.
  I understand why this is happening, but is there any way of solving this without modifying the jenkins image by setting a prefix on it?</p>
  
  <p>The main reason for why I don't want to add a prefix is because it seems like a lot of work, especially if I need to do that for all services that I want to run in docker... It just seems very impractical.</p>