免费注册 查看新帖 |

Chinaunix

广告
  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1419 | 回复: 1
打印 上一主题 下一主题

[网络管理] 求教NGINX如何配置能支持访问HTTPS站点 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-03-16 17:16 |只看该作者 |倒序浏览
我在linux下安装nginx,也加载了openssl模块,但是通过NGINX代理只能访问HTTP站点,HTTPS无法访问,比如访问www.alipay.com,页面能正常显示,但是用户名和密码框就无法访问,gmail站点也无法访问。
这是我的nginx.conf 配置文件的两个server的主要部分:

     server {
37         listen       80;
38         server_name  localhost;
39         
40         #charset koi8-r;
41
42         #access_log  logs/host.access.log  main;
43         
44         location / {
45             resolver 8.8.8.8;

49             proxy_pass http://$http_host$request_uri;
50

53 #            root   html;
54 #            index  index.html index.htm;
55         }
56
57         #error_page  404              /404.html;
58
59         # redirect server error pages to the static page /50x.html
60         #
61         error_page   500 502 503 504  /50x.html;
62         location = /50x.html {
63             root   html;
64         }
}


server {
90         listen 443;
91         server_name  localhost;
92
93         ssl on;
94         ssl_certificate  /usr/local/nginx/conf/ssl/server.crt;
95         ssl_certificate_key  /usr/local/nginx/conf/ssl/server.key;
96
97         location / {
98             resolver 8.8.8.8;
99     #       proxy_pass https://$host$request_uri;
100         }
101     }
请大神们帮们看一下。

论坛徽章:
0
2 [报告]
发表于 2014-03-17 08:56 |只看该作者
求指教啊大神们
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP