1. 安装nginx服务器sudo apt-get install nginx -y

2. 启动服务sudo service nginx start

3. 安装php环境


sudo apt-get install -y php7.1 php7.1-fpm php7.1-gd php7.1-mcrypt php7.1-mbstring php7.1-mysql php7.1-pdo php7.1-sqlite

4. 配置nginx

  • 编辑php.conf文件sudo vim /etc/nginx/conf.d/php.conf新增下边内容

server {
listen 80;
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root /var/www/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
  • 编辑default文件vim /etc/nginx/sites-available/default去掉下边这个配置的注解

location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php7.1-fpm.sock;
}

5. 刷新配置sudo service nginx reload

6. rz命令上传代码到/var/www/html

7. 给showdoc赋权限chmod -R 777 showdoc

8. 访问xx.com/showdoc/web/#/


原文地址:https://segmentfault.com/a/1190000016196743

最新文章

  1. HTML基本元素(一)
  2. iOS富文本
  3. 基于UDP协议的程序设计
  4. Cucumber
  5. Windows CMD命令大全
  6. HDU 3065 病毒侵袭持续中
  7. 集合ArrayList双色球练一练(自己的方法,太麻烦)
  8. tabbar动画切换
  9. IDE eclipse PyDev插件安装
  10. 第一章 JQuery概述
  11. 自学Linux Shell2.1-进入shell命令行
  12. Machine Learning 学习笔记2 - linear regression with one variable(单变量线性回归)
  13. StringBuffer 详解 (String系列之3)
  14. spring boot 配置全局日期类型转换器
  15. Web前端开发最佳实践系列文章汇总
  16. centos firewall-cmd常用命令
  17. flashback query闪回数据
  18. AIX中查找端口号和进程
  19. iOS开发之--打印一堆奇怪东西的解决方案
  20. 在exsi6.0中安装debian8.1 64位 无界面服务器版.

热门文章

  1. web压力測试-Web Bench
  2. C语言指针实现字符串的反转
  3. 你不知道的JavaScript--Item33 跨域总结与解决的方法
  4. Android实现浮层的上下滑动(支持内部加入View)
  5. 关于FrameBuffer【转】
  6. hdu 6082 度度熊与邪恶大魔王(2017"百度之星"程序设计大赛 - 资格赛 )
  7. PCB MS SQL 排序应用---SQL相邻数据区间值求解
  8. Echarts配置
  9. A - High School: Become Human
  10. node js koa js严格模式