Last active 2 weeks ago

user333's Avatar user333 revised this gist 2 weeks ago. Go to revision

1 file changed, 24 insertions, 9 deletions

nginx.conf

@@ -1,3 +1,5 @@
1 + include modules.d/*.conf;
2 +
1 3 # i have no idea what this section is for, but the site won't work without it
2 4 events {
3 5 worker_connections 2048;
@@ -34,6 +36,10 @@ http {
34 36 location /git {
35 37 return 301 https://git.user333.sweeux.org/;
36 38 }
39 +
40 + location /.git {
41 + return 418;
42 + }
37 43 }
38 44
39 45 server {
@@ -42,15 +48,24 @@ http {
42 48 server_name git.user333.sweeux.org;
43 49
44 50 location / {
45 - proxy_pass http://127.0.0.1:3001/;
46 - proxy_set_header Connection $http_connection;
47 - proxy_set_header Upgrade $http_upgrade;
48 - proxy_set_header Host $host;
49 - proxy_set_header X-Real-Ip $remote_addr;
50 - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
51 - proxy_set_header X-Forwarded-Proto $scheme;
52 -
53 - client_max_body_size 512M;
51 + proxy_pass http://127.0.0.1:3001/;
52 +
53 + proxy_set_header Connection $http_connection;
54 + proxy_set_header Upgrade $http_upgrade;
55 + proxy_set_header Host $host;
56 + proxy_set_header X-Real-Ip $remote_addr;
57 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
58 + proxy_set_header X-Forwarded-Proto $scheme;
59 +
60 + client_max_body_size 512M;
54 61 }
55 62 }
56 63 }
64 +
65 + # little reverse proxy for the luanti server on rpi1
66 + stream {
67 + server {
68 + listen 40001 udp;
69 + proxy_pass 192.168.2.253:40000;
70 + }
71 + }

user333's Avatar user333 revised this gist 2 weeks ago. Go to revision

1 file changed, 9 insertions, 9 deletions

nginx.conf

@@ -42,15 +42,15 @@ http {
42 42 server_name git.user333.sweeux.org;
43 43
44 44 location / {
45 - proxy_pass http://127.0.0.1:3001/;
46 - proxy_set_header Connection $http_connection;
47 - proxy_set_header Upgrade $http_upgrade;
48 - proxy_set_header Host $host;
49 - proxy_set_header X-Real-Ip $remote_addr;
50 - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
51 - proxy_set_header X-Forwarded-Proto $scheme;
52 -
53 - client_max_body_size 512M;
45 + proxy_pass http://127.0.0.1:3001/;
46 + proxy_set_header Connection $http_connection;
47 + proxy_set_header Upgrade $http_upgrade;
48 + proxy_set_header Host $host;
49 + proxy_set_header X-Real-Ip $remote_addr;
50 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
51 + proxy_set_header X-Forwarded-Proto $scheme;
52 +
53 + client_max_body_size 512M;
54 54 }
55 55 }
56 56 }

user333's Avatar user333 revised this gist 2 weeks ago. Go to revision

1 file changed, 9 insertions, 10 deletions

nginx.conf

@@ -42,16 +42,15 @@ http {
42 42 server_name git.user333.sweeux.org;
43 43
44 44 location / {
45 - proxy_pass http://127.0.0.1:3001/;
46 -
47 - proxy_set_header Connection $http_connection;
48 - proxy_set_header Upgrade $http_upgrade;
49 - proxy_set_header Host $host;
50 - proxy_set_header X-Real-Ip $remote_addr;
51 - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
52 - proxy_set_header X-Forwarded-Proto $scheme;
53 -
54 - client_max_body_size 512M;
45 + proxy_pass http://127.0.0.1:3001/;
46 + proxy_set_header Connection $http_connection;
47 + proxy_set_header Upgrade $http_upgrade;
48 + proxy_set_header Host $host;
49 + proxy_set_header X-Real-Ip $remote_addr;
50 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
51 + proxy_set_header X-Forwarded-Proto $scheme;
52 +
53 + client_max_body_size 512M;
55 54 }
56 55 }
57 56 }

user333's Avatar user333 revised this gist 2 weeks ago. Go to revision

1 file changed, 57 insertions

nginx.conf(file created)

@@ -0,0 +1,57 @@
1 + # i have no idea what this section is for, but the site won't work without it
2 + events {
3 + worker_connections 2048;
4 + }
5 +
6 + http {
7 + include mime.types;
8 +
9 + ssl_certificate /etc/letsencrypt/live/git.user333.sweeux.org/fullchain.pem;
10 + ssl_certificate_key /etc/letsencrypt/live/git.user333.sweeux.org/privkey.pem;
11 +
12 + port_in_redirect off;
13 +
14 + include /etc/letsencrypt/options-ssl-nginx.conf;
15 + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
16 +
17 + server {
18 + listen 8443 ssl;
19 + listen 8080;
20 + server_name user333.sweeux.org;
21 +
22 + location / {
23 + root /srv/http/user333.sweeux.org;
24 + }
25 +
26 + location /f/ {
27 + proxy_pass http://127.0.0.1:7000/;
28 + }
29 +
30 + location /p/ {
31 + proxy_pass http://127.0.0.1:6157/;
32 + }
33 +
34 + location /git {
35 + return 301 https://git.user333.sweeux.org/;
36 + }
37 + }
38 +
39 + server {
40 + listen 8443 ssl;
41 + listen 8080;
42 + server_name git.user333.sweeux.org;
43 +
44 + location / {
45 + proxy_pass http://127.0.0.1:3001/;
46 +
47 + proxy_set_header Connection $http_connection;
48 + proxy_set_header Upgrade $http_upgrade;
49 + proxy_set_header Host $host;
50 + proxy_set_header X-Real-Ip $remote_addr;
51 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
52 + proxy_set_header X-Forwarded-Proto $scheme;
53 +
54 + client_max_body_size 512M;
55 + }
56 + }
57 + }
Newer Older