php7 nginx 禅道,Linux下的Nginx部署禅道

一、部署安装好Nginx

二、可以在apache内也可以做该配置,也就是在apache内配置禅道:

apache其实也是一样,但是要改配置文件:

vi etc/httpd/conf/httpd.conf

改里面的禅道路径

# DocumentRoot: The directory outof which you will serve your

# documents. Bydefault, all requests are taken from thisdirectory, but

# symbolic links and aliases may be used to point to other locations.

#

DocumentRoot"/usr/local/zentaopms/www"#

重启apache:

service httpd restart

然后输入apache的ip:port/index.php,就可以开始安装禅道

安装禅道的问题:可能会遇见session.save_path不存在不可用的问题

1、先修改这三个文件的执行权限

chmod o=rwx -R /opt/zentaopms/tmp/chmod o=rwx -R /opt/zentaopms/www/data

chmod o=rwx -R /var/lib/php/session

2、改php.ini配置文件(改一个地方就ok,不要瞎改)

vi /etc/php.ini

; Argument passed to save_handler. In the case of files, this isthe path

;where data files are stored. Note: Windows users have to change this; variablein order to use PHP‘s session functions.

;

; The path can be definedas:

;

; session.save_path= "N;/path"session.save_path= "/var/lib/php/session";where N is an integer. Instead of storing all the session files in;/path, what this will do is use subdirectories N-levels deep, and

; store the session datain those directories. This is useful if; your OS has problems with many filesin one directory, and is; a more efficient layoutfor servers that handle many sessions.

可以看到:server是apache

20181222003856467968.png

三、Nginx转发php设置:

在配置文件内更改:

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

server {

listen82;

server_name localhost;

location/{

root/usr/local/zentaopms/www/;

index index.php index.html index.htm;

}

location~.php$ {

root/usr/local/zentaopms/www/;

fastcgi_pass127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME/usr/local/zentaopms/www/$fastcgi_script_name;

include fastcgi_params;

}

error_page500 502 503 504 /50x.html;

}

我的禅道源码放在哪里?

/usr/local/zentaopms

将Nginx,reload一下

/usr/local/nginx/sbin/nginx -s reload

然后输入Nginx的ip:port/index.php,就可以开始安装禅道。

可以看到:server是nginx

20181222003856669140.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值