nginx.conf
· 1.6 KiB · Nginx configuration file
Raw
include modules.d/*.conf;
# i have no idea what this section is for, but the site won't work without it
events {
worker_connections 2048;
}
http {
include mime.types;
ssl_certificate /etc/letsencrypt/live/git.user333.sweeux.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/git.user333.sweeux.org/privkey.pem;
port_in_redirect off;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
server {
listen 8443 ssl;
listen 8080;
server_name user333.sweeux.org;
location / {
root /srv/http/user333.sweeux.org;
}
location /f/ {
proxy_pass http://127.0.0.1:7000/;
}
location /p/ {
proxy_pass http://127.0.0.1:6157/;
}
location /git {
return 301 https://git.user333.sweeux.org/;
}
location /.git {
return 418;
}
}
server {
listen 8443 ssl;
listen 8080;
server_name git.user333.sweeux.org;
location / {
proxy_pass http://127.0.0.1:3001/;
proxy_set_header Connection $http_connection;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 512M;
}
}
}
# little reverse proxy for the luanti server on rpi1
stream {
server {
listen 40001 udp;
proxy_pass 192.168.2.253:40000;
}
}
| 1 | include modules.d/*.conf; |
| 2 | |
| 3 | # i have no idea what this section is for, but the site won't work without it |
| 4 | events { |
| 5 | worker_connections 2048; |
| 6 | } |
| 7 | |
| 8 | http { |
| 9 | include mime.types; |
| 10 | |
| 11 | ssl_certificate /etc/letsencrypt/live/git.user333.sweeux.org/fullchain.pem; |
| 12 | ssl_certificate_key /etc/letsencrypt/live/git.user333.sweeux.org/privkey.pem; |
| 13 | |
| 14 | port_in_redirect off; |
| 15 | |
| 16 | include /etc/letsencrypt/options-ssl-nginx.conf; |
| 17 | ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; |
| 18 | |
| 19 | server { |
| 20 | listen 8443 ssl; |
| 21 | listen 8080; |
| 22 | server_name user333.sweeux.org; |
| 23 | |
| 24 | location / { |
| 25 | root /srv/http/user333.sweeux.org; |
| 26 | } |
| 27 | |
| 28 | location /f/ { |
| 29 | proxy_pass http://127.0.0.1:7000/; |
| 30 | } |
| 31 | |
| 32 | location /p/ { |
| 33 | proxy_pass http://127.0.0.1:6157/; |
| 34 | } |
| 35 | |
| 36 | location /git { |
| 37 | return 301 https://git.user333.sweeux.org/; |
| 38 | } |
| 39 | |
| 40 | location /.git { |
| 41 | return 418; |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | server { |
| 46 | listen 8443 ssl; |
| 47 | listen 8080; |
| 48 | server_name git.user333.sweeux.org; |
| 49 | |
| 50 | location / { |
| 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; |
| 61 | } |
| 62 | } |
| 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 | } |
| 72 |