首页 文档中心 指南中心

环境配置

PHP配置

确保PHP安装了以下扩展:

  • mbstring - 多字节字符串支持
  • json - JSON处理
  • fileinfo - 文件信息
  • 目录权限

    确保以下目录可写:

    ``bash chmod 755 content/ `

    Web服务器配置

    Apache

    如果使用Apache,.htaccess 文件已包含基本配置。

    Nginx

    Nginx配置示例:

    `nginx server { listen 80; servername yourdomain.com; root /var/www/html; index index.php;

    location / { tryfiles $uri $uri/ /index.php?$querystring; }

    location ~ \.php$ { fastcgipass unix:/var/run/php/php-fpm.sock; fastcgiindex index.php; fastcgiparam SCRIPTFILENAME $documentroot$fastcgiscriptname; include fastcgiparams; }

    location ~ /\.ht { deny all; } } `

    自定义配置

    编辑 lib.php 修改系统配置:

    `php $this->config = [ 'title' => '你的Wiki标题', 'description' => '你的Wiki描述', 'primarycolor' => '#2563eb' ]; `

    安全建议

  • 禁止直接访问 .md 文件
  • 定期备份 content` 目录
  • 使用HTTPS访问
  • ← 返回列表