您的位置:首页 > 理论基础 > 计算机网络

ngnix代理转发https请求

2016-05-17 00:00 309 查看
(1)修改ngnix配置文件

打开配置文件 vim /etc/nginx/nginx.conf

http {
# HTTPS Server
server{
server_name www.xgtravels.com;
listen 443;
ssl on;
ssl_certificate /usr/local/nginx/conf/server.crt;
ssl_certificate_key /usr/local/nginx/conf/server.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ALL:!ADH:!EXPORT56:-RC4+RSA:+HIGH:+MEDIUM:!EXP;
ssl_prefer_server_ciphers on;

location / {
root html;
index index.html index.htm;
proxy_pass http://xgtravels.com:8080/com-stars-travel-web/; proxy_set_header Host $host;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: