title: How to enable files and directory listing in Docker Apache Container
body: <p>I'm using the Apache httpd image to create a simple web server. I wanted to know how I can use it so that when I start my server I can view the files in a folder named 'my_directory' via the browser. Here is my Dockerfile:</p>
  <pre><code>FROM httpd
  COPY ./my_directory/ /usr/local/apache2/htdocs/
  COPY ./my-httpd.conf /usr/local/apache2/conf/httpd.conf
  EXPOSE 80
  </code></pre>
  <p>I followed the documentation on Dockerhub and I also tried altering the directory settings in the httpd.conf file as so:</p>
  <pre><code>DocumentRoot &quot;/usr/local/apache2/htdocs&quot;
  &lt;Directory &quot;/usr/local/apache2/htdocs/&quot;&gt;
      Options Indexes FollowSymLinks MultiViews
      AllowOverride All
      Require all granted    
  &lt;/Directory&gt;
  </code></pre>
  <p>However every time I run my docker container and go to localhost:8080 I keep getting the default Apache html webpage 'It Works!'. What do I need to do so I can view the files in my directory instead?</p>