一、应用场景
浏览器到nginx是https,https代理后端http。
配置如下:
-
server {
-
listen 443 ssl;
-
server_name enca.ulifecam.com;
-
-
ssl_certificate /srv/nginx/conf/ssl/cert.pem;
-
ssl_certificate_key /srv/nginx/conf/ssl/cert;
-
ssl_session_cache shared:SSL:1m;
-
ssl_session_timeout 5m;
-
ssl_ciphers HIGH:!aNULL:!MD5;
-
ssl_prefer_server_ciphers on;
-
location / {
-
proxy_redirect http:// $scheme://;
-
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;
-
proxy_pass http://127.0.0.1:9090;
-
}
-
-
}
阅读(2149) | 评论(0) | 转发(0) |