Closed Cleam closed 2 years ago
感谢你提交的问题或反馈,我会在有时间的时候回复在此期间你可以看看之前被解决的反馈说不定有你需要的答案。 Thanks for opening this issue, a maintainer will get back to you shortly!
可能我提供的 nginx 配置真有问题,我再测试一下哈 :D
你试试下面的配置:
server {
listen 80;
server_name localhost; # CHANGE IT ON YOUR DOMAIN
location /.well-known/acme-challenge/ { allow all; }
location / { return 301 https://$host$request_uri; }
}
server {
listen 443 ssl http2;
server_name localhost; # CHANGE IT ON YOUR DOMAIN
# Configure your ssl cert and key file
ssl_certificate /etc/certs/zealot-cert.pem;
ssl_certificate_key /etc/certs/zealot.pem;
ssl_ciphers HIGH:!MEDIUM:!LOW:!aNULL:!NULL:!SHA;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:1m;
ssl_prefer_server_ciphers on;
root /app/public;
location ~* ^(/assets|/favicon.ico) {
access_log off;
expires max;
}
location / {
try_files $uri @zealot;
}
location @zealot {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Proxy "";
proxy_pass_header Server;
proxy_pass http://zealot; # CHANGE IT ON YOUR HOST AND PORT
proxy_buffering on;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
}
location /cable {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://zealot; # CHANGE IT ON YOUR HOST AND PORT
}
error_page 500 502 503 504 /500.html;
location = /500.html {
root /app/public;
}
}
@icyleaf 感谢大佬,按新的nginx配置之后就正常了。
有一个小问题就是如果要用http2,需要增加模块:ngx_http_v2_module,不然报错:nginx: [emerg] the "http2" parameter requires ngx_http_v2_module
,我目前的nginx版本:nginx version: nginx/1.17.3
我暂时没用http2,先去掉了,也能正常访问。
再次感谢~ 😃
有问题再反馈
激活链接异常
创建用户
之后,点击用户对应的激活
,显示的激活链接不正常(不应该是http且不应该出现443端口
):用户邮箱收到的激活链接是正常的(即上面链接去掉443端口)
产品二维码链接异常
问题和激活链接一样,扫二维码得到的链接依然是http且带有443端口号,导致无法正常访问:
二维码链接也是可以通过去掉443端口正常访问。
nginx的反向代理配置,按照官网文档,配置详情如下:
我的环境