vendredi 21 juillet 2017

Apache in Docker won't deliver laravel site

I have a problème with docker-compose. I am using a developpement configuration with docker-compose.

my docker-compose.yml : version: '3' services: # base de données mysql database: image: mysql:5.7 container_name: mysql57_SnptesAdhesion ports: - 3306:3306 expose: - 3306 volumes: - /data/dev/docker/composePhpSnptesAdhesion/database:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=myPassword

  # apache 2.4 et php 5.6 fourni par le fichier Dockerfile
  php:
    build: .
    container_name: apache24_php56_SnptesAdhesion
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /data/devPhp/workspace:/var/www/html
    links:
      - database
    environment:
      PMA_HOST: database
      PMA_PORT: 3306

I mount apache /var/www/html to a specific directory /data/devPhp/workspace on the machine.

It works pour simple apache conf file (000-default.conf) with :

   DocumentRoot /var/www/html

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory /var/www/html>
            Options Indexes FollowSymLinks Includes ExecCGI
            AllowOverride All
            Require all granted
    </Directory>

In this case :

works.

But for laravel 5 i need a specific documentroot directory :

   DocumentRoot /var/www/html/adhesion/public

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory /var/www/html/adhesion/public>
            Options Indexes FollowSymLinks Includes ExecCGI
            AllowOverride All
            Require all granted
            # RewriteEngine On
            # RewriteRule ^(.*)$ public/$1 [L]
    </Directory>

and it doesn't work ... This urls :

fail with 404 error ...

Thanks in advance for any idea.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2tvWpkI
via IFTTT

Aucun commentaire:

Enregistrer un commentaire