-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathnginx_wp.conf
40 lines (31 loc) · 954 Bytes
/
nginx_wp.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
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
client_max_body_size 1000m;
#上传限制参数1G以内文件可上传
server {
listen 80;
server_name wp.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
http2 on;
server_name wp.com;
ssl_certificate /etc/nginx/certs/wp_cert.pem;
ssl_certificate_key /etc/nginx/certs/wp_key.pem;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
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://wp.wp.wp.wp:9000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
}