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;
}
}
打开配置文件 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;
}
}
相关文章推荐
- HTTP状态码详解
- 部分安卓手机微信浏览器中使用XMLHttpRequest 2上传图片显示字节数为0的解决办法
- 使用单例模式实现自己的HttpClient工具类
- HTTP 访问接口封装,app开发中常用
- Windows 下 Apache HTTP Server 安装、配置以及与 Tomcat 的整合(附图)
- Windows 下 Apache HTTP Server 安装、配置以及与 Tomcat 的整合(附图)
- 使用七牛云存储解决ios7.1的app部署问题 https
- HTTP in iOS你看我就够
- HTTP状态码是什么意思?
- httpd
- http协议初体验
- http://www.doc88.com/p-7374285513754.html
- 《Wireshark 网络分析就这么简单》学习笔记
- C#网络编程 (四) 套接字编程原理
- TCPdump抓包命令详解
- 计算机网络 ip 子网掩码,子网数学习心得
- UNIX网络编程: IPC之共享内存
- http live streming
- mac下virtualbox中centos网络ip
- Android Studio中使用开源库volley进行网络访问简单示例