From 8494ef6fa1c778721d4133f70d142d1dd97d8b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 13 Mar 2024 12:19:47 +0100 Subject: [PATCH 1/5] Adjust author --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e7ca9ee5..5887d5d6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "ocelot.social", "version": "1.0.0", "description": "The ocelot.social website", - "author": "ocelot.social Community", + "author": "Ocelot.Social Community", "license": "MIT", "private": false, "scripts": { 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 2/5] 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 00000000..54892b9c --- /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; + } +} From 7ce07879e578dac1f60686f906c18a5fa18ed24e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 13 Mar 2024 14:49:34 +0100 Subject: [PATCH 3/5] Set nginx default.conf, works --- deployment/nginx/default.conf | 42 ++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/deployment/nginx/default.conf b/deployment/nginx/default.conf index 54892b9c..113ff7a2 100644 --- a/deployment/nginx/default.conf +++ b/deployment/nginx/default.conf @@ -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; + # } } From 42eaa2aaab21a37686c2ec791930e56f39e8f323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 13 Mar 2024 14:51:56 +0100 Subject: [PATCH 4/5] Set nginx default.conf, works as well --- deployment/nginx/default.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/deployment/nginx/default.conf b/deployment/nginx/default.conf index 113ff7a2..ebdb6a86 100644 --- a/deployment/nginx/default.conf +++ b/deployment/nginx/default.conf @@ -3,12 +3,12 @@ server { listen [::]:80 default_server; 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_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; From f0d929e97a9ae585b60d4d2ffe42392f6d14c374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 13 Mar 2024 14:54:31 +0100 Subject: [PATCH 5/5] Add log folder --- log/.gitignore | 3 +++ log/nginx/.gitignore | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 log/.gitignore create mode 100644 log/nginx/.gitignore diff --git a/log/.gitignore b/log/.gitignore new file mode 100644 index 00000000..0ac52373 --- /dev/null +++ b/log/.gitignore @@ -0,0 +1,3 @@ +* +!.gitignore +!nginx \ No newline at end of file diff --git a/log/nginx/.gitignore b/log/nginx/.gitignore new file mode 100644 index 00000000..c96a04f0 --- /dev/null +++ b/log/nginx/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file