title: Apache in Docker won't deliver sites
body: <p>After installing an apache webserver in a docker container, I wanted to display a sample page just to make sure it works. However I always get 404 Not found.</p>
  
  <p>Here's the dockerfile</p>
  
  <pre><code>FROM ubuntu:14.04
  MAINTAINER &lt;mail@example.org&gt;
  RUN DEBIAN_FRONTEND=noninteractive
  
  # Install required packages
  RUN apt-get -y update
  RUN apt-get install -y apache2 libapache2-mod-php5 php5-gd php5-json php5-mysql php5-curl php5-intl php5-imagick bzip2 wget
  
  # Enable the php mod
  RUN a2enmod php5
  
  # Configuration for Apache
  ADD ./apache.conf /etc/apache2/sites-available/
  RUN ln -s /etc/apache2/sites-available/apache.conf /etc/apache2/sites-enabled/
  RUN a2enmod rewrite
  
  RUN mkdir /var/www/test &amp;&amp; echo "&lt;html&gt;&lt;body&gt;&lt;h1&gt;Yo&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;" &gt;&gt; /var/www/test/index.html
  
  EXPOSE :80
  
  CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
  </code></pre>
  
  <p>apache.conf</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerAdmin webmaster@localhost
  
      DocumentRoot /var/www
  
      &lt;Directory /var/www/test/&gt;
          Options Indexes FollowSymLinks MultiViews
          AllowOverride All
          Order allow,deny
          Allow from all
      &lt;/Directory&gt;
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>The container is up and running. Port 80 is forwarded to 8080 on the host machine.</p>
  
  <p>When I browse to localhost:8080, I can see the apache2 default page. However, when I go to localhost:8080/test/index.html I do only get 404 Not found.</p>