symfony - Apache in Docker says: Symbolic link not allowed -


i use docker image: https://github.com/docker-library/php/blob/fec7f537f049aafd2102202519c3ca9cb9576707/5.5/apache/dockerfile

and use docker-compose:

apache:   build: ./site/docker/apachephp   environment:     - virtual_host=www.test.dev   volumes:     - ./site/code:/var/www/app   expose:     - "80" 

the code symfony app , uses symbolic link in web folder, assets in symbolic links in apache logs:

ah00037: symbolic link not allowed or link target not accessible: /var/www/app/web/test

all other code runs fine.
wonder if options +followsymlinks -symlinksifownermatch used correct , if there maybe other config files override someting?

or permission issue? files on host belong not apache user www-data user, read rights set however.

the apache config is:

# see http://sources.debian.net/src/apache2/2.4.10-1/debian/config-dir/apache2.conf  mutex file:/var/lock/apache2 default pidfile /var/run/apache2/apache2.pid timeout 300 keepalive on maxkeepaliverequests 100 keepalivetimeout 5 user www-data group www-data hostnamelookups off errorlog /proc/self/fd/2 loglevel warn  includeoptional mods-enabled/*.load includeoptional mods-enabled/*.conf  # ports.conf listen 80 <ifmodule ssl_module>     listen 443 </ifmodule> <ifmodule mod_gnutls.c>     listen 443 </ifmodule>  <directory />     allowoverride none     require denied </directory>  <directory /var/www/app>     options +followsymlinks -symlinksifownermatch     allowoverride     require granted </directory>  documentroot /var/www/app/web  accessfilename .htaccess <filesmatch "^\.ht">     require denied </filesmatch>  logformat "%v:%p %h %l %u %t \"%r\" %>s %o \"%{referer}i\" \"%{user-agent}i\"" vhost_combined logformat "%h %l %u %t \"%r\" %>s %o \"%{referer}i\" \"%{user-agent}i\"" combined logformat "%h %l %u %t \"%r\" %>s %o" common logformat "%{referer}i -> %u" referer logformat "%{user-agent}i" agent  customlog /proc/self/fd/1 combined  <filesmatch \.php$>     sethandler application/x-httpd-php </filesmatch>  # multiple directoryindex directives within same context add # list of resources rather replace # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex directoryindex disabled directoryindex app_dev.php index.php index.html  includeoptional conf-enabled/*.conf includeoptional sites-enabled/*.conf 

to answer own question: tips in comments above, logged in container , checked pathes , symlinks pathes of host, couldnt work.

so have create symlinks in container, unless there way tell docker follow symlinks host, doubt that.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

android - Go back to previous fragment -