上一篇:《查看文件权限》
server{ listen 80; server_name domain.com www.domain.com; rewrite ^(.*) https://www.domain.com$1 permanent; } server{ listen 443; server_name www.domain.com domain.com; if ($http_host = domain.com.cn){ rewrite ^(.*) https://www.domain.com$1 permanent; } ssl on; ssl_certificate /etc/nginx/conf.d/zhengshu/domain/1_www.domain.com.cn_bundle.crt; ssl_certificate_key /etc/nginx/conf.d/zhengshu/domain/2_www.domain.com.cn.key; location / { proxy_pass http://127.0.0.1:8080; proxy_set_header Host www.domain.com.cn; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Via "nginx"; } }