title: BaGet with Apache2 Reverse Proxy on Docker Compose not working
body: <p>I'm trying to setup <a href="https://loic-sharma.github.io/BaGet/" rel="nofollow noreferrer">BaGet</a> in Docker with Docker Compose behind an Apache2 reverse proxy, where Apache2 is also running in Docker from Docker Compose.</p>
  <p>I've done this successful with Jenkins and Sonar, but with BaGet (http://localhost:8000/baget) I get &quot;Service Unavailable&quot; even though it's available directly on its own port, e.g.: http://localhost:5555/.</p>
  <p>My Docker Compose file looks like this:</p>
  <pre><code>version: &quot;3&quot;
  services:
      smtp:
          container_name: smtp
          image: namshi/smtp
  
      jenkins:
          container_name: jenkins
          build: ./jenkins/
          environment:
              - JENKINS_OPTS=&quot;--prefix=/jenkins&quot;
  
      sonar:
          container_name: sonar
          image: sonarqube:latest
      environment:
          - SONAR_WEB_CONTEXT=/sonar
  
      baget:
          container_name: baget
          image: loicsharma/baget:latest
          ports:
              - &quot;5555:80&quot;
          environment:
              - PathBase=/baget
  
      apache:
          container_name: apache
          build: ./apache/
          ports:
              - &quot;8000:80&quot;
  </code></pre>
  <p>My Apache2 Docker File looks like this:</p>
  <pre><code>FROM debian:stretch
  
  RUN apt-get update
  RUN apt-get install -y apache2 &amp;&amp; apt-get clean
  
  RUN a2enmod proxy
  RUN a2enmod proxy_http
  RUN a2dissite 000-default.conf
  
  COPY devenv.conf /etc/apache2/sites-available/devenv.conf
  
  RUN a2ensite devenv
  
  EXPOSE 80
  CMD apachectl -D FOREGROUND
  </code></pre>
  <p>And my Apache2 config file like this:</p>
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerAdmin ...
      ServerName ...
      ServerAlias devenv
      ProxyRequests Off
      AllowEncodedSlashes NoDecode
      &lt;Proxy *&gt;
          Order deny,allow
          Allow from all
      &lt;/Proxy&gt;
      ProxyPreserveHost on
      
      ProxyPass /jenkins http://jenkins:8080/jenkins nocanon
      ProxyPassReverse /jenkins http://jenkins:8080/jenkins nocanon
  
      ProxyPass /sonar http://sonar:9000/sonar nocanon
      ProxyPassReverse /sonar http://sonar:9000/sonar nocanon
  
      ProxyPass /baget http://baget:5555/baget nocanon
      ProxyPassReverse /baget http://baget:5555/baget nocanon
  &lt;/VirtualHost&gt;
  </code></pre>
  <p>I've tried various different compinations of ProxyPass URLs, I've tried using localhost instead of the internal Docker Compose serivces names, I've tried different ports and I've tried running BaGet without the PathBase environment variable and nothing works!</p>
  <p>I'm hoping it's something obvious with my configuration and not something odd goign on with BaGet.</p>