从15.0升级到18.10后,外网无法登录已解决 悬赏5积分
15.0:
默认安装,使用80端口,通过宝塔配置代理外网443,内外网都可以正常登录
配置如下:
server
{
listen 443 ssl http2;
server_name zt.xxx.com;
index index.php index.html index.htm default.php default.htm default.html;
root /www/wwwroot/zt.xxx.com;
ssl_certificate /etc/letsencrypt/live/zt.xxx.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/zt.xxx.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
error_page 497 https://$host$request_uri;
error_page 404 /404.html;
error_page 502 /502.html;
location ~ /purge(/.*) {
proxy_cache_purge cache_one $1$is_args$args;
#access_log /www/wwwlogs/zt.xxx.com_purge_cache.log;
}
include /www/server/panel/vhost/nginx/proxy/zt.xxx.com/*.conf;
include enable-php-00.conf;
include /www/server/panel/vhost/rewrite/zt.xxx.com.conf;
location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
{
return 404;
}
location ~ \.well-known{
allow all;
}
access_log /www/wwwlogs/zt.xxx.com.log;
error_log /www/wwwlogs/zt.xxx.com.error.log;
}
===========
#PROXY-START/
location /
{
location ~ .*\.(php|jsp|cgi|asp|aspx|flv|swf|xml)?$
{
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 REMOTE-HOST $remote_addr;
proxy_pass http://172.17.1.71;
}
proxy_pass http://172.17.1.71;
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 REMOTE-HOST $remote_addr;
#持久化连接相关配置
#proxy_connect_timeout 30s;
#proxy_read_timeout 86400s;
#proxy_send_timeout 30s;
#proxy_http_version 1.1;
#proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection "upgrade";
add_header X-Cache $upstream_cache_status;
expires 12h;
}
#PROXY-END/
=======================
升级到18.10后,内网可以正常使用,外网可以打开登录页面,但点击登录没有反应
禅道版本:禅道开源版 18.10
安装包类型:Windows安装包
操作系统:Windows Server 2008
客户端浏览器:Chrome
🍉 nginx.conf 里面添加这个配置试下(需重启nginx) proxy_set_header Host $http_host;
也有部分用户需要添加这个配置: proxy_set_header Cookie $http_cookie; 如果还是不可以的话 zentao/config/my.php文件中增加以下配置: $config->framework->filterCSRF = false; 无需重启禅道;
回复
|
禅道-李锡碧
2024-01-15 09:28:03
nginx代理配置中添加下面配置,重启服务试试:
proxy_set_header X-Forwarded-Proto $scheme; 也可以试试,在zentaopms/config/my.php中添加一行配置: 如果还是不行,可以联系官网商务QQ,邀请加入技术交流群沟通下。 |