阿里云 Centos 7安装PHP7 配置LNMP
2016-06-03 17:58
441 查看
1、安装教程:
http://www.thinkcmf.com/topic/topic/index/id/351.html
2、增加文件解析
修改文件:/etc/nginx/conf.d/default.conf;
index index.php index.html index.htm;
3、测试网页性能工具:
https://developers.google.com/speed/pagespeed/insights/
经测试,需要开启 gzip、启用浏览器缓存
开启gzip,修改 /etc/nginx/nginx.conf 添加:
4、开启静态文件浏览器缓存:
修改文件:/etc/nginx/conf.d/default.conf;
5、开启 opCache(重要!性能增加 70%)
http://www.tuicool.com/articles/NjmQNj6
http://www.thinkcmf.com/topic/topic/index/id/351.html
2、增加文件解析
修改文件:/etc/nginx/conf.d/default.conf;
index index.php index.html index.htm;
3、测试网页性能工具:
https://developers.google.com/speed/pagespeed/insights/
经测试,需要开启 gzip、启用浏览器缓存
开启gzip,修改 /etc/nginx/nginx.conf 添加:
gzip on; gzip_comp_level 2; # 压缩比例,比例越大,压缩时间越长。默认是1 gzip_types text/xml text/plain text/css application/javascript application/x-javascript application/rss+xml; # 哪些文件可以被压缩 gzip_disable "MSIE [1-6]\."; # IE6无效
4、开启静态文件浏览器缓存:
修改文件:/etc/nginx/conf.d/default.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|ico)$ { expires 30d; } location ~ .*\.(js|css)?$ { expires 7d; }
5、开启 opCache(重要!性能增加 70%)
http://www.tuicool.com/articles/NjmQNj6
相关文章推荐
- Linux系统日志及日志分析
- 嵌入式Linux ARM汇编(三)——ARM汇编指令(二)
- CentOS下安装UNRAR
- 嵌入式Linux基础知识6(ubuntu16 下操作目录,出现Permission denied的解决办法)
- 嵌入式Linux ARM汇编(三)——ARM汇编指令(一)
- Maven 编译命令错误之编译错误的解决
- 每日一linux命令(8)-------cp
- Linux下搭建嵌入式交叉编译环境
- linux下安装JDK,设置JAVA环境变量
- 嵌入式Linux ARM汇编(二)——ARM异常处理
- Linux sync命令的作用
- linux下面用ssh上传,下载文件
- 修复kali Linux安装AMD ati显卡驱动后开机黑屏
- linux单机LNMP环境搭建
- centos开通mysql端口3306
- 【Linux】Linux系统下的PCB结构(task_struct)
- Linux 从虚拟地址到物理地址
- 嵌入式Linux ARM汇编(一)——ARM体系结构
- Linux netstat命令详解
- Linux中地址映射的全过程