server { listen ${NGINX_PORT} default_server; listen [::]:${NGINX_PORT}; server_name ${NGINX_HOST}; access_log /var/log/nginx/${NGINX_HOST}.access.log main; error_log /var/log/nginx/${NGINX_HOST}.error.log; root /var/www/html/public; client_max_body_size 20m; location / { index index.html index.htm index.php; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } if (!-e $request_filename) { rewrite ^.*$ /index.php last; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { fastcgi_pass php:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} }