Showdoc 搭建项目 API 文档系统

showdoc 是 PHP 开发的一款 api 文档系统,因此所需环境和普通 PHP 项目一致

准备环境:
php
nginx
composer //注意更换国内镜像,否则速度会很慢,甚至失败

创建项目

composer create-project showdoc/showdoc

配置 showdoc 写权限

chmod a+w showdoc/install
chmod a+w showdoc/Sqlite
chmod a+w showdoc/Sqlite/showdoc.db.php
chmod a+w showdoc/Public/Uploads/
chmod a+w showdoc/Application/Runtime
chmod a+w showdoc/server/Application/Runtime
chmod a+w showdoc/Application/Common/Conf/config.php
chmod a+w showdoc/Application/Home/Conf/config.php

配置服务器

下面的配置时windows环境,如果要使用linux ,注意可能需要修改一些配置项
#=== showdoc == 
 server {
         listen       80;
         server_name   showdoc.leesin.me;
         charset utf-8;
         #access_log  logs/host.access.log  main;
         root  E:\showdoc;
         index index.php index.html;
         if (!-e $request_filename) {
           rewrite  ^(.*)$  /index.php?s=/$1  last;
           break;
        }

         #error_page  404              /404.html;

         # redirect server error pages to the static page /50x.html
         #
         error_page   500 502 503 504  /50x.html;
                 location = /50x.html {
                 root   html;
         }
         location ~ \.php$ {
             fastcgi_pass   fastcgi_backend;  # linux无法使用这种方式,而是 127.0.0.1:9000方式
             fastcgi_index  index.php;
             include        fastcgi_params;
             fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
             fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
         }
 }

 配置 hosts 
    127.0.0.1   showdoc.leesin.me
 重启 nginx 服务

开启sqlite 相关扩展

php.ini
extension=php_sqlite3.dll
extension=php_pdo_sqlite.dll

安装

浏览器输入: showdoc.leesin.me/install 
选择语言并确定,安装完成点击进入首页

访问使用

http://showdoc.leesin.me/web
即可使用

转载于:https://blog.51cto.com/12750968/2109172

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值