-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathnginx.conf
54 lines (45 loc) · 1.08 KB
/
nginx.conf
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
events {}
http {
access_log /dev/stdout;
error_log /dev/stderr debug;
rewrite_log on;
proxy_set_header Host wechaty.github.io;
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_set_header Accept-Encoding $http_accept_encoding;
proxy_buffering off;
proxy_request_buffering off;
proxy_http_version 1.1;
proxy_intercept_errors on;
server {
listen 80;
# server_name wechaty.js.org;
location @docusaurus {
rewrite ^(.*)$ /docusaurus$1 break;
proxy_pass https://wechaty.github.io;
}
location @jekyll {
rewrite ^(.*)$ /jekyll$1 break;
proxy_pass https://wechaty.github.io;
}
#
# Docusaurus
#
location ~ ^/(docs|img|css|js|assets/css|assets/js) {
try_files $uri @docusaurus;
}
#
# Jekyll
#
location ~ ^/(\d\d\d\d|assets|news|blog|contributors) {
try_files $uri @jekyll;
}
#
# Web Root
#
location / {
try_files $uri @jekyll @docusaurus;
}
}
}