diff --git a/Dockerfile b/Dockerfile index 7b703b3b0cc44f05ee6fa70dc37d45489d2b06c3..981c90aa0753e638823919e648f4785af1b0cc68 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,10 @@ RUN export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" ghostscript \ php-imagick RUN sed -i 's/domain="coder" rights="none" pattern="PDF"/domain="coder" rights="read|write" pattern="PDF"/g' /etc/ImageMagick-6/policy.xml -RUN sed -i 's/listen = \/run\/php\/php7.2-fpm.sock/listen = localhost:9000/g' /etc/php/7.2/fpm/pool.d/www.conf +RUN sed -i 's/listen = \/run\/php\/php7.2-fpm.sock/listen = \/var\/run\/php\/php7.2-fpm.sock/g' /etc/php/7.2/fpm/pool.d/www.conf +RUN sed -i 's/listen.owner = www-data/listen.owner = nobody/g' /etc/php/7.2/fpm/pool.d/www.conf +RUN sed -i 's/listen.group = www-data/listen.group = nogroup/g' /etc/php/7.2/fpm/pool.d/www.conf +RUN sed -i 's/;listen.mode = 0660/listen.mode = 0660/g' /etc/php/7.2/fpm/pool.d/www.conf # Install PHP Extensions RUN apt-get update && apt-get install -y \ diff --git a/docker_config/default.conf b/docker_config/default.conf index 0572f111771e3cd8adf25318158e84c6021cc575..b6eded52100332086d2035dbf6112184f96c9765 100644 --- a/docker_config/default.conf +++ b/docker_config/default.conf @@ -16,7 +16,7 @@ server { location ~ \.php$ { root html; - fastcgi_pass localhost:9000; + fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/html/analyticsapi/public/$fastcgi_script_name; include fastcgi_params; diff --git a/docker_config/nginx.conf b/docker_config/nginx.conf index 4ac4bc7f03de109a85af2c0e0e3a7755bf268560..ea739317d6ee62edf155956e751b459361b752d1 100644 --- a/docker_config/nginx.conf +++ b/docker_config/nginx.conf @@ -1,4 +1,4 @@ -#user nginx; +user nobody nogroup; worker_processes 1; error_log /var/log/nginx/error.log warn; diff --git a/public/storage b/public/storage index 9533b72adfc37e66246025623aafffe6e9bdc787..2c0c69db60a2a5a64c2d7fb6bf3a84292b716e09 120000 --- a/public/storage +++ b/public/storage @@ -1 +1 @@ -/var/www/html/public \ No newline at end of file +/var/www/html/analyticsapi/storage/ \ No newline at end of file