一、安装php7.1

#添加php源

sudo add-apt-repository ppa:ondrej/php

#更新apt数据,载入php源数据

sudo apt update

#安装php-fpm

sudo apt install php7.1-fpm

sudo apt install php7.1

二、安装nginx

sudo apt install nginx

三、为laravel 5.5安装php扩展

sudo apt install php7.1-mysql mcrypt php7.1-mcrypt php7.1-mbstring php7.1-xml openssl

四、配置php配置

sudo vim /etc/php/7.1/fpm/php.ini

找到 cgi.fix_pathinfo 修改为 0 ,如下:

cgi.fix_pathinfo=0

保存并退出,因为这是一个可能的安全漏洞。

五、为laravel配置nginx

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

server {

listen 80 default_server;

listen [::]:80 default_server;

# SSL configuration

#

# listen 443 ssl default_server;

# listen [::]:443 ssl default_server;

#

# Note: You should disable gzip for SSL traffic.

# See: https://bugs.debian.org/773332

#

# Read up on ssl_ciphers to ensure a secure configuration.

# See: https://bugs.debian.org/765782

#

# Self signed certs generated by the ssl-cert package

# Don't use them in a production server!

#

# include snippets/snakeoil.conf;

root /var/www/html/auth/public;

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

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

server_name _;

location / {

# First attempt to serve request as file, then

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

try_files $uri $uri/ /index.php?$query_string;

}

# 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;

#}

location ~ \.php$ {

include snippets/fastcgi-php.conf;

#

# # With php7.0-cgi alone:

# fastcgi_pass 127.0.0.1:9000;

# # With php7.0-fpm:

fastcgi_split_path_info ^(.+\.php)(/.+)$;

fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;

# fastcgi_index index.php;

include fastcgi_params;

}

# deny access to .htaccess files, if Apache's document root

# concurs with nginx's one

#

#location ~ /\.ht {

# deny all;

#}

location ~ /\.(?!well-known).* {

deny all;

}

}

laravel5.5 php7,ubuntu 16.04+nginx+mysql+php7.1+laravel5.5环境相关推荐

  1. 阿里云 服务器 系统 php mysql_阿里云服务器配环境(Ubuntu 16.04+Nginx+MySQL+PHP)并部署hexo博客...

    购买服务器 阿里云向学生出售优惠价格的服务器,一个月只需9.5块,具体配置看图吧 更新Ubuntu源,安装Git 1 2 3sudo apt update sudo apt upgrade sudo ...

  2. Ubuntu 16.04安装MySQL(5.7.18)

    Ubuntu 16.04安装MySQL(5.7.18) 此篇为http://www.cnblogs.com/EasonJim/p/7139275.html的分支页. 安装MySQL前需要做如下了解: ...

  3. ubuntu 环境下调试mysql源码_【转】Ubuntu 16.04下 Mysql 5.7.17源码编译与安装

    Ubuntu 16.04下 Mysql5.7.17源码编译与安装 系统环境 一. 系统安装条件 1.cmake MySQL使用cmake跨平台工具预编译源码,用于设置mysql的编译参数. sudo ...

  4. 在Ubuntu 16.04.3 LTS上搭建Go语言环境实录

    1.安装 sudo apt-get install golang-go 目前go的最新版本是1.9.2,但是在Ubuntu 16.04上采用预编译好的包安装的话,只能是go 1.6.x版本. 安装完成 ...

  5. win10安装linux分配两个磁盘,Win10 与 Ubuntu 16.04 LTS 双硬盘双系统安装及环境配置...

    笔记本主系统是Win10(64bit),想硬盘安装子系统Ubuntu 16.04 LTS (64bit),于是在自己的笔记本电脑上尝试安装. 笔记本配置: 系统:Windows 10 64bit  p ...

  6. Ubuntu 16.04下搭建intel NCS 2开发环境OpenVINO

    材料准备 Ubuntu 16.04电脑(x86_64架构),需要联网 intel NCS 2设备 intel Distribution of OpenVINO toolkit for Linux(20 ...

  7. Ubuntu 16.04下MySQL 5.7.18取消开机启动(解决无法使用Sysvinit(update-rc.d/sysv-rc-conf)脚本关闭)...

    首先了解以下运行级别对应工具的变化历史: 1.Ubuntu 6.10及以前版本使用Sysvinit. 2.Ubuntu 14.10及以前版本使用Upstart但是还留着Sysvinit并存. http ...

  8. ubuntu 16.04 + apache2 将php7.1 切换到 php7.3

    背景: ubuntu 更新时,选择,保留当前 php 版本,导致出现了 多个php 版本 ,phpinfo 显示的是 php7.1.在用 php -i 查看,发现,很多扩展打不开. 1. Ubuntu ...

  9. Ubuntu 16.04 + Nginx + Django 项目部署

    搭建服务器虚拟环境 在本机进入虚拟环境,执行命令导出当前需要的所有包. pip freeze > requirements.txt 通过ftp或者scp等软件将项目代码和requirements ...

最新文章

  1. mysql bind param_为什么bindParam必须要指定类型?
  2. 301. Remove Invalid Parentheses
  3. 计算机excel行高在哪里,如何在Excel2016中设置改行高和列宽?
  4. 机器翻译软件从实验室走向市场
  5. 关于标准输入输出流和string类
  6. 计算机视觉中 RNN 应用于目标检测
  7. python调用库实现返回ping的时延_python在windows下实现ping操作并接收返回信息
  8. wordpress 后台404解决办法
  9. EclipseIDEA使用经验
  10. MySQL 8.0.11 中使用 grant ... identified by 时 error 1064 near 'identified by '密码'' at line 1...
  11. java权限是怎么做的_java如何做权限管理
  12. 《数据挖掘概念与技术》第三版 范明 孟小峰译 课后习题答案(一)
  13. WIFI adb重启后仍然生效
  14. 混合整数规划线性规划——Matlab例程
  15. STM32串口通信 中断配置
  16. 计算机串口是232吗,RS232串口简介
  17. wps小写金额转大写快捷键_日记坊 - excel小写金额快速转换大写的几个小技巧
  18. java.lang.IllegalArgumentException: The number of object passed must be even but was [1]
  19. 腾达无线路由器怎么设置能让自己的网速快
  20. ro模式数据库mysql_ro数据库-和ro数据库相关的内容-阿里云开发者社区

热门文章

  1. 草稿 断开始datagrewvies 01
  2. 演练 看不见的硬币 1002
  3. javascript 西瓜一期 03 机器语言与高级语言
  4. 前端开发 浮动相关的规则 overflow 0229
  5. 1910101811-2
  6. layui基础上的tree菜单动态渲染;
  7. Nginx日志配置详解
  8. NFS网络文件系统服务介绍与实战
  9. 我们真正需要的目标(原名:制定目标你会吗?)
  10. 关于图片轮换与Tab标签