19,612
社区成员
发帖
与我相关
我的任务
分享
server {
listen 443 ssl http2;
ssl on;
ssl_certificate /usr/local/nginx/ssl/*.x.com.key.pem;
ssl_certificate_key /usr/local/nginx/ssl/*.x.com.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;
ssl_session_timeout 10m;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_buffer_size 1400;
add_header Strict-Transport-Security max-age=15768000;
ssl_stapling on;
ssl_stapling_verify on;
server_name a.x.com;
access_log /data/wwwlogs/access_nginx.log combined;
root /data/mall/dist;
index index.html index.htm index.php;
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
#将请求转发到admin
location /admin {
root html;
proxy_pass http://139.x.x.x:8090/admin;
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_set_header X-Forwarded-Proto $scheme;
client_max_body_size 100m;
index index.html index.htm;
}
}
server {
listen 443 ssl http2;
ssl on;
ssl_certificate /usr/local/nginx/ssl/*.x.com.key.pem;
ssl_certificate_key /usr/local/nginx/ssl/*.x.com.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;
ssl_session_timeout 10m;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_buffer_size 1400;
add_header Strict-Transport-Security max-age=15768000;
ssl_stapling on;
ssl_stapling_verify on;
server_name *.x.com;
access_log /data/wwwlogs/access_nginx.log combined;
root /data/mall/dist;
index index.html index.htm index.php;
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
#将请求转发到admin
location /admin {
root html;
proxy_pass http://127.0.0.1:8090/admin;
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_set_header X-Forwarded-Proto $scheme;
client_max_body_size 100m;
index index.html index.htm;
}
}