- 论坛徽章:
- 0
|
我在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 }
请大神们帮们看一下。 |
|