laravel5.5 php7,ubuntu 16.04+nginx+mysql+php7.1+laravel5.5环境
一、安装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环境相关推荐
- 阿里云 服务器 系统 php mysql_阿里云服务器配环境(Ubuntu 16.04+Nginx+MySQL+PHP)并部署hexo博客...
购买服务器 阿里云向学生出售优惠价格的服务器,一个月只需9.5块,具体配置看图吧 更新Ubuntu源,安装Git 1 2 3sudo apt update sudo apt upgrade sudo ...
- Ubuntu 16.04安装MySQL(5.7.18)
Ubuntu 16.04安装MySQL(5.7.18) 此篇为http://www.cnblogs.com/EasonJim/p/7139275.html的分支页. 安装MySQL前需要做如下了解: ...
- ubuntu 环境下调试mysql源码_【转】Ubuntu 16.04下 Mysql 5.7.17源码编译与安装
Ubuntu 16.04下 Mysql5.7.17源码编译与安装 系统环境 一. 系统安装条件 1.cmake MySQL使用cmake跨平台工具预编译源码,用于设置mysql的编译参数. sudo ...
- 在Ubuntu 16.04.3 LTS上搭建Go语言环境实录
1.安装 sudo apt-get install golang-go 目前go的最新版本是1.9.2,但是在Ubuntu 16.04上采用预编译好的包安装的话,只能是go 1.6.x版本. 安装完成 ...
- win10安装linux分配两个磁盘,Win10 与 Ubuntu 16.04 LTS 双硬盘双系统安装及环境配置...
笔记本主系统是Win10(64bit),想硬盘安装子系统Ubuntu 16.04 LTS (64bit),于是在自己的笔记本电脑上尝试安装. 笔记本配置: 系统:Windows 10 64bit p ...
- Ubuntu 16.04下搭建intel NCS 2开发环境OpenVINO
材料准备 Ubuntu 16.04电脑(x86_64架构),需要联网 intel NCS 2设备 intel Distribution of OpenVINO toolkit for Linux(20 ...
- 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 ...
- ubuntu 16.04 + apache2 将php7.1 切换到 php7.3
背景: ubuntu 更新时,选择,保留当前 php 版本,导致出现了 多个php 版本 ,phpinfo 显示的是 php7.1.在用 php -i 查看,发现,很多扩展打不开. 1. Ubuntu ...
- Ubuntu 16.04 + Nginx + Django 项目部署
搭建服务器虚拟环境 在本机进入虚拟环境,执行命令导出当前需要的所有包. pip freeze > requirements.txt 通过ftp或者scp等软件将项目代码和requirements ...
最新文章
- mysql bind param_为什么bindParam必须要指定类型?
- 301.	Remove Invalid Parentheses
- 计算机excel行高在哪里,如何在Excel2016中设置改行高和列宽?
- 机器翻译软件从实验室走向市场
- 关于标准输入输出流和string类
- 计算机视觉中 RNN 应用于目标检测
- python调用库实现返回ping的时延_python在windows下实现ping操作并接收返回信息
- wordpress 后台404解决办法
- EclipseIDEA使用经验
- MySQL 8.0.11 中使用 grant ... identified by 时 error 1064 near 'identified by '密码'' at line 1...
- java权限是怎么做的_java如何做权限管理
- 《数据挖掘概念与技术》第三版 范明 孟小峰译 课后习题答案(一)
- WIFI adb重启后仍然生效
- 混合整数规划线性规划——Matlab例程
- STM32串口通信 中断配置
- 计算机串口是232吗,RS232串口简介
- wps小写金额转大写快捷键_日记坊 - excel小写金额快速转换大写的几个小技巧
- java.lang.IllegalArgumentException: The number of object passed must be even but was [1]
- 腾达无线路由器怎么设置能让自己的网速快
- ro模式数据库mysql_ro数据库-和ro数据库相关的内容-阿里云开发者社区