From de9cae795f93d03e68d965c59af4b21d96df4ec7 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Mon, 23 Dec 2024 10:39:16 -0500 Subject: initial --- build/nginx/nginx.conf | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 build/nginx/nginx.conf (limited to 'build/nginx/nginx.conf') diff --git a/build/nginx/nginx.conf b/build/nginx/nginx.conf new file mode 100644 index 0000000..d3dc0ae --- /dev/null +++ b/build/nginx/nginx.conf @@ -0,0 +1,54 @@ +worker_processes 4; +daemon off; +pid /tmp/nginx.pid; +error_log /var/log/nginx/error.log; + +events { + worker_connections 1024; +} + +http { + include mime.types; + default_type application/octet-stream; + sendfile on; + keepalive_timeout 70; + server_tokens off; + client_max_body_size 2m; + + access_log /var/log/nginx/access.log; + + include "nginx.api.conf"; + + server { + listen 8080; + root /opt/site; + + gzip on; + gzip_vary on; + gzip_proxied any; + gzip_comp_level 6; + gzip_buffers 16 8k; + gzip_http_version 1.1; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml image/x-icon; + + include "nginx.api.server.conf"; + + location /favicon.ico { + add_header Cache-Control "public, max-age=31536000, immutable"; + root /opt/site/public; + } + + location /public { + add_header Cache-Control "public, max-age=31536000, immutable"; + try_files $uri =404; + } + + location / { + add_header Content-Security-Policy "base-uri 'none'"; + root /opt/crimson; + include fastcgi_params; + fastcgi_pass php:9000; + fastcgi_param SCRIPT_FILENAME $document_root/index.php; + } + } +} -- cgit v1.2.3-freya