-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathreverse-proxy-domain.conf
43 lines (29 loc) · 1 KB
/
reverse-proxy-domain.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
server {
listen 80;
listen [::]:80;
listen 443 ssl;
listen [::]:443 ssl;
listen 443 quic;
listen [::]:443 quic;
server_name yuming.com;
ssl_certificate /etc/nginx/certs/yuming.com_cert.pem;
ssl_certificate_key /etc/nginx/certs/yuming.com_key.pem;
# HTTP 重定向到 HTTPS
if ($scheme = http) {
return 301 https://$host$request_uri;
}
location / {
proxy_pass https://fandaicom;
proxy_set_header Host fandaicom;
proxy_set_header Referer https://fandaicom;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Accept-Encoding "";
proxy_set_header Accept-Language $http_accept_language;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
sub_filter_once off;
sub_filter "fandaicom" "yuming.com";
# proxy_cache my_proxy_cache;
add_header Alt-Svc 'h3=":443"; ma=86400';
}
}