-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnginx.conf
105 lines (80 loc) · 3.77 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
server {
listen 198.50.237.34:80;
listen [2607:5300:60:3478::34]:80;
if ($scheme != "https") {
return 301 https://$host$request_uri;
}
server_name misaka.yuri.moe;
charset utf-8;
keepalive_timeout 120s;
set $no_cache 0;
#set $no_cache 1;
gzip off;
location / {
#rewrite '^/analytics$' /index.php?action=analytics;
proxy_pass http://localhost:8085/;
proxy_set_header Host $http_host; # required for docker client's sake
proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 900;
}
#access_log /var/log/nginx/misaka_access.log;
location /pass {
# error_log /var/log/nginx/misaka.log;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
proxy_no_cache 1;
proxy_cache_bypass 1;
proxy_pass https://zh.moegirl.org.cn/api.php;
# proxy_pass http://zh.moegirl.org:8080/api.php;
proxy_set_header Host zh.moegirl.org.cn;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_cookie_domain moegirl.org misaka.yuri.moe;
proxy_cookie_domain moegirl.org.cn misaka.yuri.moe;
proxy_connect_timeout 120s;
proxy_ssl_server_name on;
proxy_set_header X-Real-IP $remote_addr;
}
location /passcommon {
#error_log /var/log/nginx/misaka.log debug;
proxy_no_cache 1;
proxy_cache_bypass 1;
proxy_pass https://commons.moegirl.org.cn/api.php;
# proxy_pass http://commons.moegirl.org:8080/api.php;
proxy_set_header Host commons.moegirl.org.cn;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_cookie_domain moegirl.org misaka.yuri.moe;
proxy_cookie_domain morgirl.org.cn misaka.yuri.moe;
proxy_connect_timeout 120s;
proxy_ssl_server_name on;
proxy_set_header X-Real-IP $remote_addr;
}
location /avatar-set {
proxy_no_cache 1;
proxy_cache_bypass 1;
proxy_pass https://commons.moegirl.org.cn/Special:%E4%B8%8A%E4%BC%A0%E5%A4%B4%E5%83%8F;
# proxy_pass http://commons.moegirl.org:8080/Special:%E4%B8%8A%E4%BC%A0%E5%A4%B4%E5%83%8F;
proxy_set_header Host commons.moegirl.org.cn;
proxy_cookie_domain moegirl.org misaka.yuri.moe;
proxy_cookie_domain morgirl.org.cn misaka.yuri.moe;
proxy_connect_timeout 120s;
proxy_send_timeout 120s;
proxy_read_timeout 120s;
client_body_buffer_size 10M;
client_max_body_size 10M;
proxy_ssl_server_name on;
proxy_set_header X-Real-IP $remote_addr;
}
# location /.well-known {
# proxy_pass https://106.185.43.242/.well-known;
# proxy_set_header Host misaka.yuri.moe;
# proxy_connect_timeout 120s;
# }
listen 198.50.237.34:443 ssl http2;
listen [2607:5300:60:3478::34]:443 ssl http2;
ssl_certificate /etc/letsencrypt/live/misaka.yuri.moe/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/misaka.yuri.moe/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}