Files
cms/cms.nginx.conf

44 lines
1.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
upstream cms-host{
server cms.fjy8018.xin:8085;
}
server {
listen 80;
listen 443 ssl;
server_name cms.fjy8018.xin; #域名
index index.html; #指定的server的root的访问页面
root /index; #指定的server的root目录
#SSL-START SSL相关配置请勿删除或修改下一行带注释的404规则
#error_page 404/404.html;
#HTTP_TO_HTTPS_START
if ($server_port !~ 443){
rewrite ^(/.*)$ https://$host$1 permanent;
}
#HTTP_TO_HTTPS_END
ssl_certificate /www/wwwroot/cms/full_chain.pem;
ssl_certificate_key /www/wwwroot/cms/private.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
error_page 497 https://$host$request_uri;
#SSL-END
#charset koi8-r;
#access_log logs/host.access.log main;
#我工程的context-path=mytest
location /cms {
proxy_pass http://cms.fjy8018.xin:8085;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
# root html;
# index index.html index.htm;
}
}