linux php探针 nginx,Ubuntu16.04搭建LNMP

1.进行更新   (具体文档请联系本博主,首页有博主邮箱)

2.安装MySQL

# 连续输入两次相同的密码

3.安装nginx和php

添加nginx和php的ppa源

4.安装Nginx

5.安装PHPFastCGI管理器

6.修改配置文件(此步可以省略)

7.查看 listen = /run/php/php7.0-fpm.sock 是否被开启

一般为开启

8.修改重启下 php-fpm7.0 (可以忽略)

9.修改nginx配置文件

sudo vim /etc/nginx/sites-enabled/default

# Add index.php to the list if you are using PHP

index index.php index.html index.htm index.nginx-debian.html;               添加index.php

server_name _;

location / {

# First attempt to serve request as file, then

# as directory, then fall back to displaying a 404.

try_files $uri $uri/ =404;

}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

#

location ~ \.php$ {                                                       在此把#去掉

include snippets/fastcgi-php.conf;                                 在此把#去掉

#

#       # With php7.0-cgi alone:

#       fastcgi_pass 127.0.0.1:9000;

#       # With php7.0-fpm:

fastcgi_pass unix:/run/php/php7.0-fpm.sock;                          在此把#去掉

}                                                                          在此把#去掉

10.socket 方式 必须和上面socket的listen路径一样

11.重启nginx

12.在/var/www/html/目录下,新建个index.php测试下看看

13.搭建完成 探针显示

PHP Version 7.0.18-0ubuntu0.16.04.1

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值