nginx下部署showdoc
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
nginx下部署showdoc的更多相关文章
- Nginx下部署Laravel项目
Nginx下部署Laravel项目 标签(空格分隔): php Nginx配置文件 listen 80 default_server; #listen [::]:80 default_server i ...
- Nginx 下部署 HTTPS 与安全调优
什么是 HTTPS?# HTTPS(全称:Hyper Text Transfer Protocol over Secure Socket Layer),是以安全为目标的HTTP通道,简单讲是HTTP的 ...
- 01_Nginx安装,nginx下部署项目,nginx.conf配置文件修改,相关文件配置
1.下载Nginx,进入Nginx下载地址:http://nginx.org/ 点击nginx-1.8.0,进入:http://nginx.org/en/download.html,下载文件: ...
- vue项目windowServer nginx下部署
https://www.cnblogs.com/jiangwangxiang/p/8481661.html nginx下载地址 http://nginx.org/en/download.html 下载 ...
- apache下部署showdoc
1. 安装apache2服务器sudo apt-get install apache2 2. 安装php环境 sudo apt-get install php7.1 libapache2-mod-ph ...
- Nginx下部署TP5项目
标签(空格分隔): linux nginx配置文件: server { listen 81; #listen [::]:80; server_name _; index index.html inde ...
- debian7下部署nginx服务器
笔者是在vmware中的Debian7下部署nginx服务器,采用离线部署方式.过程如下: 1.准备好需要的离线安装包 nginx-1.6.2.tar.gz,pcre-8.34.tar.gz,open ...
- 在Docker下部署Nginx
在Docker下部署Nginx 在Docker下部署Nginx,包括: 部署一个最简单的Nginx,可以通过80端口访问默认的网站 设置记录访问和错误日志的路径 设置静态网站的路径 通过proxy_p ...
- centos下安装nginx并部署angular应用
注意:直接yum安装的nginx有问题,不能直接安装,因为centos默认库里面没有nginx.如果安装过程中出现一些文件夹或者文件找不到的话,应该是你的nginx的版本没有安装对.最效率的办法是删除 ...
随机推荐
- hdu4430之枚举+二分
Yukari's Birthday Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Other ...
- #定位系统性能瓶颈# sysdig
安装方法: curl -s https://s3.amazonaws.com/download.draios.com/stable/install-sysdig | sudo bash [root@l ...
- HDU 5533/ 2015长春区域 G.Dancing Stars on Me 暴力
Dancing Stars on Me Problem Description The sky was brushed clean by the wind and the stars were col ...
- elasticsearch date_histogram
(5)Date Histogram Aggregation 时间直方图聚合,专门对时间类型的字段做直方图聚合.这种需求是比较常用见得的,我们在统计时,通常就会按照固定的时间断(1个月或1年等)来做统计 ...
- 自适应阈值分割—大津法(OTSU算法)C++实现
大津法是一种图像灰度自适应的阈值分割算法,是1979年由日本学者大津提出,并由他的名字命名的.大津法按照图像上灰度值的分布,将图像分成背景和前景两部分看待,前景就是我们要按照阈值分割出来的部分.背景和 ...
- hdu 5823 color II —— 子集DP
题目:http://acm.hdu.edu.cn/showproblem.php?pid=5823 看博客:http://www.cnblogs.com/SilverNebula/p/5929550. ...
- IJ:ALI OSS 配置
ylbtech-IJ:ALI OSS 配置 1. src/resources/返回顶部 1.src/resources/ 1.1.aliyunoss.properties # oss\u7684\u5 ...
- git常见冲突及解决办法
1.内容冲突 产生冲突的原因:两个用户修改了同一个文件的同一块区域,git会报告内容冲突.我们常见的都是这种. 解决冲突的办法:编辑冲突文件,修改冲突. 例如:冲突文件test.c test.c发生冲 ...
- 捣鼓TinyMCE粘贴图片并上传+Flask后台
好久没有编程了,最近需要完成一个小功能,为了方便,需要粘贴图片后上传到后台.前台编辑器用tinymce(N年前用过,我也就知道这个编辑器而已.这次使用下来感觉文档更丰富了),后台我用的Flask.昨天 ...
- 原生JS---2
js中的程序控制语句 常见的程序有三种执行结构: 1. 顺序结构 2. 分支结构 3. 循环结构 顺序结构:程序从第一行开始执行,按顺序执行到最后一行 分支结构:就像一条岔路口,必须选择且只能选择其中 ...