From 7b56fd2488cb59e40650f9689d79ac92e525cb15 Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Wed, 8 Dec 2021 23:39:06 +0200 Subject: [PATCH] =?UTF-8?q?Nginx.conf=20does=20need=20to=20live=20here=20a?= =?UTF-8?q?fter=20all=20=F0=9F=98=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx.conf | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 nginx.conf diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..40442dd --- /dev/null +++ b/nginx.conf @@ -0,0 +1,48 @@ +server { + listen 80 default_server; + listen [::]:80 default_server; + + server_name _; + + client_max_body_size 128M; + + gzip on; + gzip_proxied any; + gzip_types text/plain text/xml text/css application/x-javascript; + gzip_vary on; + gzip_disable "MSIE [1-6]\.(?!.*SV1)"; + + sendfile on; + sendfile_max_chunk 512k; + + root /app/web; + + access_log off; + + location / { + include /etc/nginx/mime.types; + + root /app/web; + index index.html index.htm index.php; + + try_files $uri $uri/ /index.php?q=$uri&$args; + } + + location ~ .php$ { + include fastcgi.conf; + + fastcgi_read_timeout 300; + fastcgi_pass php:9000; + + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME /app/web/$fastcgi_script_name; + fastcgi_param PATH_INFO $fastcgi_script_name; + + fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log"; + fastcgi_buffers 16 16k; + fastcgi_buffer_size 32k; + + include fastcgi_params; + } +} +