入坑新版WeCenter V4.0 ,安装过程和注意事项。

eliliu1314
eliliu1314 这家伙很懒,还没有设置简介

0 人点赞了该文章 · 1049 浏览

1.因为需要使用二级目录(运行目录),所以需要设置conf的root位置

—另外,因为使用tp,所以需要添加tp的重写规则。

vi /usr/local/nginx/conf/nginx.conf

server
    {
        listen 80 default_server reuseport;
        #listen [::]:80 default_server ipv6only=on;
        server_name _;
        index index.html index.htm index.php;
				#在root中将站点位置设置成二级目录位置
        root  /home/wwwroot/default/public;

        #error_page   404   /404.html;

        # Deny access to PHP files in specific directory
        #location ~ /(wp-content|uploads|wp-includes|images)/.*\\.php$ { deny all; }

        include enable-php.conf;

        location /nginx_status
        {
            stub_status on;
            access_log   off;
        }

        location ~ .*\\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
        }

        location ~ .*\\.(js|css)?$
        {
            expires      12h;
        }

        location ~ /.well-known {
            allow all;
        }

        location ~ /\\.
        {
            deny all;
        }
	
        #需要添加tp重写规则,添加下面的内容
	location / {
		if (!-e $request_filename) {
		 rewrite ^(.*)$ /index.php?s=$1 last;
		 break;
		}
	}

        access_log  /home/wwwlogs/access.log;
    }

2.但是运行依然500错误,所以需要修改另一个文件,fastcgi.conf

vi /usr/local/nginx/conf/fastcgi.conf

#在此配置中添加网站的根目录路径
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/:/home/wwwroot/default/";

3.重启服务就ok了

4.然后开始安装Wecenter V4

就下载好了,上传到服务器站点根目录,绑定域名(也可以用ip地址)。

然后就如下所示:



然后。。。根据环境监测的要求一项一项的改。。。。。。


~fileinfo扩展安装,解压php安装包,进入ext目录,找到fileinfo目录后进入目录。

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config
make && make install

vi /usr/local/php/etc/php.ini

#extension=fileinfo => extension=fileinfo

然后修改/usr/local/php/etc/php.ini 文件 extension=fileinfo

重启lnmp。

~开启exec函数,修改php.ini文件,找到禁用列表并删除对应函数名。

disable_functions = proc_open, popen, exec, system, shell_exec, passthru

以上基本可以解决遇到的问题。

**另外注意!

请下载了程序的同学们注意看目录下的README.md文件,里面有很多注意和服务器配置要求。

特别是各种配置版本问题!

发布于 2022-06-11 12:30

免责声明:

本文由 eliliu1314 原创发布于 WeCenter ,著作权归作者所有。

登录一下,更多精彩内容等你发现,贡献精彩回答,参与评论互动

登录! 还没有账号?去注册

暂无评论