源码包
4621

修改config目录中的config.php 中webRoot参数无效已解决 悬赏5积分

提问者心是蓝色 答案数2 阅读数4195 发表时间2017-04-10 15:37:05

修改参数$config->webRoot      = '/zentao';

没有效果。最新版本9.1.1

很多js和css没加载下来。

禅道版本:9.1.1源码包

操作系统:

客户端浏览器:

备注

其他参数例如 设置 $config->version      = '9.1.x1';  有效。就是设置 webRoot无效。我要安装到虚拟目录下。

 
设置备注
内容
答案列表
📬
2017-04-10 17:59:35
填写 $config->webRoot         = getWebRoot(); 然后试试。
👦🏻
2017/04/11
还是不行。。。不知道啥情况。我的环境是 ubuntu16 nginx+php7

nginx里面主要配置:
location ~ ^/zentao/.+\.php$ {
root /opt/zentao/www/;
rewrite /zentao/(.*\.php?) /$1 break;
fastcgi_index index.php;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_param SCRIPT_FILENAME /opt/zentao/www/$fastcgi_script_name;
include fastcgi_params;
}
location ~ ^/zentao($|/.*) {
alias /opt/zentao/www/$1;
index index.php index.html index.htm;
}
🌸
2017-04-12 14:14:50

nginx配置参考下:

    location / {
        root   /var/www/zentaopms/www;
        try_files $uri $uri/ /index.php?$args;
        index  index.php index.html;
    }

    location ~ \.php$ {
        root           /var/www/zentaopms/www;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        fastcgi_param  PATH_INFO $request_uri;
        include        fastcgi_params;
    }


👦🏻
2017/04/13
谢谢你的回复。你这样是配置到了根路径下面,我想加一个虚拟路径例如
location /zentao {
xxxxxxxxx其他内容
}。可是没有效果
👦🏻
2017/04/13
location ~ ^/zentao/.+\.php$ {
root /opt/zentao/www;
#rewrite /zentao/(.*\.php?) /$1 break;
fastcgi_index index.php;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;

if ( $fastcgi_script_name ~ ^/zentao/(.*\.php) ) {
set $cginame $1;
}
fastcgi_param SCRIPT_FILENAME $document_root/$cginame;
include fastcgi_params;
}
location ~ ^/zentao($|/.*) {
alias /opt/zentao/www/$1;
index index.php index.html index.htm;
}
这样就好了
联系我们
联系人
刘璐/高级客户经理
电话(微信)
18562550650
QQ号码
2845263372
联系邮箱
liulu@easycorp.ltd
返回顶部
刘璐
高级客户经理
18562550650
2845263372
统一服务热线 4006-8899-23
我要提问提问有任何问题,您都可以在这里提问。 问题反馈反馈点击这里,让我们聆听您的建议与反馈。