author | Luke Hoersten <luke@hoersten.org> |
Sat, 22 Jul 2023 23:27:09 -0500 | |
changeset 218 | 1db4800bc4f5 |
parent 202 | 252069788104 |
permissions | -rw-r--r-- |
119 | 1 |
server { |
2 |
listen 80; |
|
3 |
server_name {{nginx_server_name}}; |
|
4 |
return 301 https://$host$request_uri; |
|
5 |
} |
|
6 |
||
7 |
server { |
|
8 |
listen 443 ssl http2; |
|
9 |
server_name {{nginx_server_name}}; |
|
10 |
||
11 |
ssl_certificate {{nginx_ssl_cert}}; |
|
12 |
ssl_certificate_key {{nginx_ssl_privkey}}; |
|
13 |
ssl_ecdh_curve X25519:prime256v1:secp384r1:secp521r1; |
|
14 |
||
15 |
gzip on; |
|
16 |
gzip_types |
|
17 |
application/javascript |
|
18 |
application/x-javascript |
|
19 |
application/json |
|
20 |
application/rss+xml |
|
21 |
application/xml |
|
22 |
image/svg+xml |
|
23 |
image/x-icon |
|
24 |
application/vnd.ms-fontobject |
|
25 |
application/font-sfnt |
|
26 |
text/css |
|
27 |
text/plain; |
|
28 |
gzip_min_length 256; |
|
29 |
gzip_comp_level 5; |
|
30 |
gzip_http_version 1.1; |
|
31 |
gzip_vary on; |
|
32 |
||
33 |
location ~ ^/.well-known/(webfinger|nodeinfo|host-meta) { |
|
34 |
proxy_set_header Host $host; |
|
35 |
proxy_set_header X-Real-IP $remote_addr; |
|
36 |
proxy_set_header X-Forwarded-For $remote_addr; |
|
202
252069788104
Backed out changeset 10051617d075
Luke Hoersten <luke@hoersten.org>
parents:
200
diff
changeset
|
37 |
proxy_pass http://127.0.0.1:{{nginx_proxy_port}}; |
119 | 38 |
proxy_redirect off; |
39 |
} |
|
40 |
||
41 |
location ~ ^/(css|img|js|fonts)/ { |
|
42 |
root {{nginx_static_content}}; |
|
43 |
# Optionally cache these files in the browser: |
|
44 |
# expires 12M; |
|
45 |
} |
|
46 |
||
47 |
location / { |
|
48 |
proxy_set_header Host $host; |
|
49 |
proxy_set_header X-Real-IP $remote_addr; |
|
50 |
proxy_set_header X-Forwarded-For $remote_addr; |
|
202
252069788104
Backed out changeset 10051617d075
Luke Hoersten <luke@hoersten.org>
parents:
200
diff
changeset
|
51 |
proxy_pass http://127.0.0.1:{{nginx_proxy_port}}; |
119 | 52 |
proxy_redirect off; |
53 |
} |
|
54 |
} |