V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
frozenway
V2EX  ›  问与答

禅道 开源版本有用过的吗?配置了 https 协议,死活登陆不上,换成 http 就可以登录

  •  
  •   frozenway · 2019-10-31 16:53:19 +08:00 · 2548 次点击
    这是一个创建于 1611 天前的主题,其中的信息可能已经有所发展或是发生改变。

    nginx 配置为

    server {
        listen       443;
        server_name  zentao.xxxx.com;
        index index.html index.htm index.php;
        root /data/www/zentaopms/www;
    
        ssl on;
        ssl_certificate ssl/3007504_zentao.xxxx.com.pem;
        ssl_certificate_key ssl/3007504_zentao.xxxx.com.key;
        ssl_session_timeout 5m;
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
    
        location ~ .*\.(php|php7)?$
        {
            fastcgi_pass  127.0.0.1:9000;
            fastcgi_index index.php;
            include fastcgi.conf;
        }
        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires 1d;
        }
        location ~ .*\.(js|css)?$
        {
            expires 1d;
        }
        access_log  /alidata/log/nginx/access/default.log;
    }
    

    不知道是 nginx 配置出问题了还是怎样?

    7 条回复    2019-10-31 21:07:15 +08:00
    doveyoung
        1
    doveyoung  
       2019-10-31 17:09:02 +08:00
    我替楼下老哥问一下,报什么错(狗头)

    listen 443 ssl http2 这个不知道有没有用,我一般习惯这么写
    frozenway
        2
    frozenway  
    OP
       2019-10-31 17:10:42 +08:00
    @doveyoung 没报任何错误,输入账号密码点击登录,然后没任何提示就回到登录页面
    frozenway
        3
    frozenway  
    OP
       2019-10-31 17:11:18 +08:00
    这里有禅道的人吗?
    GuryYu
        4
    GuryYu  
       2019-10-31 17:17:03 +08:00
    我用的 docker 加 ningx 反代,https 可以正常使用。
    参考 nginx 配置如下:
    ```
    server{
    listen 443 http2 ssl;
    server_name zentao.xxx.com;

    ssl_certificate cert/xxx.com/fullchain1.pem;
    ssl_certificate_key cert/xxx.com/privkey1.pem;
    #省略部分 ssl 配置

    location / {
    rewrite "^.*$" /www permanent;
    }

    location /www {
    proxy_pass http://1.1.1.1:80/www;
    proxy_redirect off;
    proxy_set_header Host $host:$server_port;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    }
    }
    ```
    frozenway
        5
    frozenway  
    OP
       2019-10-31 17:28:30 +08:00
    @GuryYu 你这是在 nginx 里把 https 转成 http?
    GuryYu
        6
    GuryYu  
       2019-10-31 17:34:11 +08:00
    @frozenway #5
    是的,禅道本身部署的是 http。
    因为我们内网有许多需要映射到外网 https 的服务,所以有个单独的 nginx 来处理反代和 https。
    用一个 nginx 应该也是可以的。
    takitooru
        7
    takitooru  
       2019-10-31 21:07:15 +08:00 via Android
    @GuryYu 搭车问下怎么配置 baseurl
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4755 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 09:46 · PVG 17:46 · LAX 02:46 · JFK 05:46
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.