ajax nginx 转发 sessionid_Nginx的编译安装(为搭建zabbix系统)

Zabbix学习笔记(二)- Nginx的编译安装(为搭建zabbix系统)

1、 环境介绍

操作系统:Centos7.3 Linux

版本:nginx-1.14.2

镜像源:阿里镜像源

2、 安装依赖包

yum install -y wget gcc gcc-c++ make pcre pcre-devel zlib zlib-devel openssl openssl-devel

3、 安装nginx

版本:nginx-1.14.2

tar zxf nginx-1.14.2.tar.gz

cd nginx-1.14.2

./configure --prefix=/usr/local/nginx

make

make install

4、 启动

修改环境变量:

Vi /etc/profile

PATH=$PATH:/usr/local/nginx/sbin/

nginx –t #检查nginx配置

nginx #启动

ss –lntup#进程检查

nginx -s stop #关闭nginx

17427c7ee3dca6c63a345cca3db1102e.png

5、 配置文件的位置

Nginx配置文件:conf/nginx.conf

Nginx日志文件:

Nginx的文件目录:

/usr/local/nginx/sbin、conf、logs、html

6、 nginx处理php程序

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

1、

location / {

root html;

index index.html index.htm;

}

修改为:

location / {

root html;

index index.html index.htm index.php;

}

2、

#location ~ .php$ {

# root html;

# fastcgi_pass 127.0.0.1:9000;

# fastcgi_index index.php;

# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;

# include fastcgi_params;

#}

修改为:

location ~ .php$ {

root html;

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME $document_root$ fastcgi_script_name;

include fastcgi_params;

}

7、 测试

8352fe11af612f6f0d65b01ec47dbbf3.png

Zabbix系列请看下集-php的安装

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值