diff --git a/nginad/Dockerfile b/nginad/Dockerfile index c98ff18..37576f3 100644 --- a/nginad/Dockerfile +++ b/nginad/Dockerfile @@ -24,6 +24,7 @@ RUN apk add -U ca-certificates \ && cd upload \ && php composer.phar self-update \ && php composer.phar install \ + && chown -R nobody:nobody public \ && cd config/autoload \ && cp database.local.php.dist database.local.php \ && cp delivery.local.php.dist delivery.local.php \ @@ -31,7 +32,6 @@ RUN apk add -U ca-certificates \ && cp rtb.config.local.php.dist rtb.config.local.php \ && sed -i -e "s/'pass' => ''/'pass' => 'root'/" \ -e "s/'host' => 'localhost'/'host' => 'mysql'/" database.local.php \ - && chown -R nobody:nobody . \ && apk del git \ && rm -rf /var/cache/apk/* diff --git a/nginad/nginx.conf b/nginad/nginx.conf index d010a29..0d05ddd 100644 --- a/nginad/nginx.conf +++ b/nginad/nginx.conf @@ -1,26 +1,25 @@ -worker_processes 4; +user nobody; +worker_processes 4; events { - worker_connections 1024; + worker_connections 1024; } http { - include mime.types; - default_type application/octet-stream; - sendfile on; - keepalive_timeout 65; + include mime.types; + default_type application/octet-stream; + sendfile on; + keepalive_timeout 65; server { - listen 80; - server_name _; + listen 80; + server_name _; + root /var/www/html/upload/public; + try_files $uri @php_index; - root /var/www/html/upload/public/; - index index.php; - - location ~ \.php$ { + location @php_index { include fastcgi_params; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_param REDIRECT_STATUS 200; + fastcgi_param SCRIPT_FILENAME $document_root/index.php; fastcgi_pass 127.0.0.1:9000; } }