D
D
Dim Boy2019-10-26 21:26:20
Apache HTTP Server
Dim Boy, 2019-10-26 21:26:20

Why is access blocked in volumes?

at the root of the site, the script works, but here is the error when entering the site of the form site.com/admin :

client denied by server configuration: /var/www/html/favicon.ico

I create a docker-compose.yml container:
site:
  build: .
  restart: unless-stopped
  container_name: vasylkiv_today
  volumes:
   - /home/www/site.com/logs:/var/log/apache2
   - /home/www/site.com/html:/var/www/html
  ports:
   - "80:80"

Dockerfile:
FROM ubuntu:14.04
RUN apt-get update
RUN apt-get -y install libapache2-mod-php5 php5-mysql unzip wget php5-curl nano
RUN a2enmod rewrite
RUN service apache2 restart
WORKDIR /var/www/html
ADD config/apache2.conf /etc/apache2/apache2.conf
ADD config/charset.conf /etc/apache2/conf-enabled/charset.conf
ADD config/php.ini /etc/php5/apache2/php.ini
ENTRYPOINT ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]

In apache2.conf file:
<Directory /var/www/html>
  Options Indexes FollowSymLinks
  AllowOverride all
  Require all granted
</Directory>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question