From c1dcd38d533d98ebe8c695cba1550dc1e13102ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 13 Mar 2024 13:25:07 +0100 Subject: [PATCH] Set nginx default.conf, first try --- deployment/nginx/default.conf | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 deployment/nginx/default.conf diff --git a/deployment/nginx/default.conf b/deployment/nginx/default.conf new file mode 100644 index 0000000..54892b9 --- /dev/null +++ b/deployment/nginx/default.conf @@ -0,0 +1,28 @@ +server { + listen 80 default_server; + listen [::]:80 default_server; + + location / { + root /var/www/localhost/htdocs/ocelot.social/docs/.vuepress/dist; + index index.html; + + try_files $uri $uri/ =404; + + access_log /var/www/localhost/htdocs/ocelot.social/log/nginx/access.log; + error_log /var/www/localhost/htdocs/ocelot.social/log/nginx/error.log; + } + location /hooks/ { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + + proxy_pass http://127.0.0.1:9000/hooks/; + proxy_redirect off; + + access_log /var/www/localhost/htdocs/ocelot.social/log/nginx-access.hooks.log hooks_log; + error_log /var/www/localhost/htdocs/ocelot.social/log/nginx-error.backend.hook.log warn; + } +}