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:
FROM httpd
COPY ./my_directory/ /usr/local/apache2/htdocs/
COPY ./my-httpd.conf /usr/local/apache2/conf/httpd.conf
EXPOSE 80
I followed the documentation on Dockerhub and I also tried altering the directory settings in the httpd.conf file as so:
DocumentRoot "/usr/local/apache2/htdocs"
<Directory "/usr/local/apache2/htdocs/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
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?