ssl - CKAN ON HTTPS ERR_SSL_PROTOCOL_ERROR
问题描述
我尝试按照https://github.com/ckan/ckan/wiki/SSL将我的 CKAN 项目运行到 HTTPS
这是我的 nginx 配置文件
proxy_cache_path /tmp/nginx_cache levels=1:2 keys_zone=cache:30m max_size=250m;
proxy_temp_path /tmp/nginx_proxy 1 2;
#server {
# listen 80 default;
# server_name mindset.ccgeo.info:84;
# return 301 https://$server_name$request_uri;
#}
server {
listen 443 ssl;
ssl_certificate host.cert;
ssl_certificate_key host.key;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
client_max_body_size 100M;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:EC>
ssl_prefer_server_ciphers off;
add_header Strict-Transport-Security "max-age=63072000" always;
ssl_stapling on;
ssl_stapling_verify on;
if ($scheme != "https") {
return 301 https://$host$request_uri;
}
location / {
proxy_pass http://127.0.0.1:8080/;
proxy_set_header Host $host;
#proxy_set_header X-Url-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache cache;
proxy_cache_bypass $cookie_auth_tkt;
proxy_no_cache $cookie_auth_tkt;
proxy_cache_valid 30m;
proxy_cache_key $host$scheme$proxy_host$request_uri;
# In emergency comment out line to force caching;
# proxy_ignore_headers X-Accel-Expires Expires Cache-Control;
}
}
server {
listen 80;
server_name mindset.ccgeo.info:84;
rewrite ^/(.*) https://mindset.ccgeo.info:84 permanent;
}
在我的 ckan.ini 中,我将 ckan.site_url 更改为
ckan.site_url = https://mindset.ccgeo.info:84
还添加了
ckan.devserver.ssl_cert = /etc/nginx/host.cert
ckan.devserver.ssl_key = /etc/nginx/host.key
我生成了我的 SSL 证书,我遵循 ckan 文档https://docs.ckan.org/en/2.9/maintaining/configuration.html?highlight=ssl#ckan-devserver-ssl-cert
当我重新加载页面时出现错误 ERR_SSL_PROTOCOL_ERROR
请提供任何帮助。提前致谢
解决方案
推荐阅读
- python - Pandas:基于 pandas 列中匹配子字符串的 Groupby
- java - 在 Java 中声明常量的最佳方式
- javascript - 如何过滤有时值为空的数组?
- vega - 使用 Node.js 的服务器端部署未提供正确的 SVG
- django - 如何使用django将choicefiled的值存储在数据库中
- postgresql - PostgreSQL:一个索引快,另一个索引慢
- c# - 将接口转换为泛型类(继承)
- spring - 使用 Spring Sleuth Zipkin 配置基本身份验证
- python - 弹跳球不会回来pygame
- java - 是否可以在不将通量转换为流的情况下从通量中获取第一个元素?