环境配置
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'
];
`
安全建议
文件