ubuntu 安装php7.1

1、更新ubuntu系统
sudo apt-get update
2、安装php
add-apt-repository ppa:ondrej/php 添加php源
apt-get update
apt-get install php7.1-fpm 安装php-fpm
3、安装nginx
4、配置
编辑 vim /etc/nginx/sites-available/default

取消"location ~ .php"的注释,如下三行对应修改

root /www;fastcgi_pass unix:/run/php/php7.1-fpm.sock;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;5、重启nginxsudo service nginx restart

相关文章

文章浏览阅读2.3k次,点赞4次,收藏22次。最近安装了CARLA预...
文章浏览阅读6.3k次,点赞5次,收藏15次。在清华镜像中下载U...
文章浏览阅读5k次。linux环境, python3.7.问题描述: 安装...
文章浏览阅读4.2k次,点赞4次,收藏17次。要安装这个 standa...
文章浏览阅读894次,点赞51次,收藏31次。在安卓使用vscode主...