-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathreverse-proxy.conf
More file actions
67 lines (45 loc) · 1.66 KB
/
reverse-proxy.conf
File metadata and controls
67 lines (45 loc) · 1.66 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
67
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;
if ($scheme = http) {
return 301 https://$host$request_uri;
}
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass http://0.0.0.0:0000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
add_header Alt-Svc 'h3=":443"; ma=86400';
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|bmp|swf|eot|svg|ttf|woff|woff2|webp)$ {
proxy_pass http://0.0.0.0:0000;
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_http_version 1.1;
proxy_cache my_proxy_cache;
proxy_set_header Accept-Encoding "";
proxy_set_header Connection "";
aio threads;
# add_header Cache-Control $add_cache_control;
add_header X-Cache-Status $upstream_cache_status always;
add_header Alt-Svc 'h3=":443"; ma=86400';
log_not_found off;
access_log off;
}
location ^~ /.well-known/acme-challenge/ {
default_type "text/plain";
root /var/www/letsencrypt;
}
client_max_body_size 1000m;
}