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

5. 刷新配置sudo service nginx reload

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

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

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


  • 参考http://www.showdoc.cc/web/#/php?page_id=15072

你可能感兴趣的:(Showdoc,Nginx)