I am using docker-compose to mount run a docker image with php:7.0-apache and mount my files to /var/www/html. When I run docker-compose up everything builds fine. When I visit localhost:8080 on a mac I am able to view the site as it should appear. When I visit on windows it says 403 forbidden - You don't have permission to access / on this server. Apache/2.4.25 (Debian) Server at localhost Port 8080. Please help I need this to run on windows machine.
docker-compose.yml
version: '3'
services:
web:
container_name: ves-corporate-site
build:
context: .
dockerfile: ./.docker/Dockerfile
volumes:
- ./dist:/var/www/html
ports:
- "8080:80"
Dockerfile
FROM php:7.0-apache
# Run Linux apt (Advanced Package Tool) to and install any packages
RUN apt-get update && \
apt-get install -y --no-install-recommends
RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
# Enable mod_rewrite in apache modules
RUN a2enmod rewrite
File structure
/
.docker/
Dockerfile
dist/
index.php
(many-other .php files)
docker-compose.yml
No files are mounted in /var/www/html when I use docker-compose exec web bash to check them.
docker-compose exec web bash
ls
On a Mac I see my full working directory though.
Diving in further I have found my apache2.conf in my container at
etc/apache2/apache2.conf
In it I found this. This make sense to why it won't let me mount my files right? However When I update it to allow me I am unsure of next steps. How to I restart apache and the container while keeping my changes to allow me write to to /var/www/html. In some dire need of instruction, please help thanks.
<Directory />
Options FollowSymLink
AllowOverride None
Order allow, deny
</Directory>