nginx简单配置示例
Ant丶
·
2021-02-11
·
via CAYZLH
server {
listen 80;
server_name xxx.xxx.com;
rewrite ^(.*)$ https://$host$1 permanent;
}
server {
listen 443 ssl;
server_name xxx.xxx.com;
ssl_certificate /opt/nginx/ssl/xxxxx.pem;
ssl_certificate_key /opt/nginx/ssl/xxxxx.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
underscores_in_headers on;
location ~ /demo {
proxy_set_header Host xxx.xxx.com;
proxy_set_header X-Real-IP $http_x_forwarded_for;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
proxy_pass http://xxx.service;
}
}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。