Set nginx default.conf, works

This commit is contained in:
Wolfgang Huß 2024-03-13 14:49:34 +01:00
parent c1dcd38d53
commit 7ce07879e5

View File

@ -2,27 +2,39 @@ server {
listen 80 default_server;
listen [::]:80 default_server;
location / {
location / {
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_buffers 4 512k;
# proxy_buffer_size 256k;
# proxy_pass http://127.0.0.1:80/;
# proxy_redirect off;
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;
# 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;
# 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;
# 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;
}
# 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;
# }
}