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; |
200
|
37 |
|
|
38 |
set $upstream http://127.0.0.1:{{nginx_proxy_port}}; |
|
39 |
proxy_pass $upstream; |
|
40 |
|
119
|
41 |
proxy_redirect off; |
|
42 |
} |
|
43 |
|
|
44 |
location ~ ^/(css|img|js|fonts)/ { |
|
45 |
root {{nginx_static_content}}; |
|
46 |
# Optionally cache these files in the browser: |
|
47 |
# expires 12M; |
|
48 |
} |
|
49 |
|
|
50 |
location / { |
|
51 |
proxy_set_header Host $host; |
|
52 |
proxy_set_header X-Real-IP $remote_addr; |
|
53 |
proxy_set_header X-Forwarded-For $remote_addr; |
200
|
54 |
|
|
55 |
set $upstream http://127.0.0.1:{{nginx_proxy_port}}; |
|
56 |
proxy_pass $upstream; |
|
57 |
|
119
|
58 |
proxy_redirect off; |
|
59 |
} |
|
60 |
} |