-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnginx.conf
More file actions
38 lines (35 loc) · 1.35 KB
/
nginx.conf
File metadata and controls
38 lines (35 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
server {
listen 80;
server_name scribble.example.tld;
root /var/www/scribble.example.tld;
access_log /var/log/nginx/scribble.access.log;
error_log /var/log/nginx/scribble.error.log;
location / { return 301 https://scribble.example.tld$request_uri; }
location /.well-known/ { allow all; }
}
server {
listen 443 ssl;
server_name scribble.example.tld;
root /var/www/scribble.example.tld;
ssl_certificate /etc/letsencrypt/live/scribble.example.tld/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/scribble.example.tld/privkey.pem;
access_log /var/log/nginx/scribble.access.log;
error_log /var/log/nginx/scribble.error.log;
location / {
resolver 127.0.0.11 valid=30s;
set $upstream_app scribble;
set $upstream_port 13131;
set $upstream_proto http;
client_max_body_size 512M; # Set upload limit to reasonable size
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
}
location /.well-known/ {
allow all;
}
}