-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.shipiru.conf
More file actions
66 lines (65 loc) · 3.13 KB
/
Copy pathnginx.shipiru.conf
File metadata and controls
66 lines (65 loc) · 3.13 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# The docs and the four demos moved from their subdomains to paths on the
# apex on 2026-09-27 (see nginx.container.conf, which answers the same
# redirects over HTTPS). Plain HTTP goes to the final URL in one hop.
map "$host:$uri" $rmk_http_redirect {
default https://$host$request_uri;
renderer.reactmarkdownkit.com:/ https://reactmarkdownkit.com/markdown-renderer$is_args$args;
editor.reactmarkdownkit.com:/ https://reactmarkdownkit.com/markdown-editor$is_args$args;
mermaid.reactmarkdownkit.com:/ https://reactmarkdownkit.com/mermaid-editor$is_args$args;
slides.reactmarkdownkit.com:/ https://reactmarkdownkit.com/markdown-slides$is_args$args;
~^(docs|www|renderer|editor|mermaid|slides)\.reactmarkdownkit\.com: https://reactmarkdownkit.com$request_uri;
}
server {
listen 80;
listen [::]:80;
server_name docs.reactmarkdownkit.com mermaid.reactmarkdownkit.com renderer.reactmarkdownkit.com editor.reactmarkdownkit.com reactmarkdownkit.com www.reactmarkdownkit.com;
return 301 $rmk_http_redirect;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name docs.reactmarkdownkit.com mermaid.reactmarkdownkit.com renderer.reactmarkdownkit.com editor.reactmarkdownkit.com reactmarkdownkit.com www.reactmarkdownkit.com;
ssl_certificate /etc/letsencrypt/live/docs.reactmarkdownkit.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/docs.reactmarkdownkit.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
client_max_body_size 50m;
location / {
proxy_pass http://127.0.0.1:9011;
proxy_http_version 1.1;
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;
proxy_read_timeout 120s;
}
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
}
server {
listen 80;
listen [::]:80;
server_name slides.reactmarkdownkit.com;
return 301 $rmk_http_redirect;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name slides.reactmarkdownkit.com;
ssl_certificate /etc/letsencrypt/live/slides.reactmarkdownkit.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/slides.reactmarkdownkit.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
client_max_body_size 50m;
location / {
proxy_pass http://127.0.0.1:9011;
proxy_http_version 1.1;
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;
proxy_read_timeout 120s;
}
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
}