【发布时间】:2016-05-26 10:42:39
【问题描述】:
我正在尝试在 http 和 https 上运行我的应用程序。该应用程序呈现静态 html 以及它们的 css' 和 js'。我使用 nginx 来提供页面。我已经配置了我的 nginx 配置,但是页面没有在 https 上呈现。
当我点击http://subdomain.example.com 时,效果很好!
但是,当我点击 https://subdomain.example.com 时,Chrome 中会出现 CONNECTION_RESET 或 CONNECTION_CLOSED 错误。
下面是我的配置:
server {
listen 80;
server_name subdomain.example.com;
#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;
location / {
root /var/www/html/htmls/;
index entergmat.html;
}
}
server{
listen 443 ssl;
ssl on;
server_name subdomain.example.com;
ssl_certificate /path/to/certificate.crt;
ssl_certificate_key /path/to/certificate.key;
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
# ssl_ciphers HIGH:!aNULL:!MD5;
keepalive_timeout 70;
location / {
root /var/www/html/htmls/;
index entergmat.html;
}
}
请求您的帮助。
谢谢!
【问题讨论】: