安装前的配置如下:
1、前往宝塔面板 新建一个项目
2、上传源码到新建的项目
3、设置运行目录为:/public文件夹并关闭 防跨站攻击(open_basedir)
接下来进行配置:
- 安装SG15扩展
- 重启PHP服务
完成配置后,点击下一步即可进行正常安装 若下一步页面未正常显示 可重新尝试配置 或直接进行申请协助(18.8/次) 联系QQ:2092115940
伪静态配置如下:
Apache:
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/(apiv1|apiv2|apiv3)/
RewriteRule ^(apiv1|apiv2|apiv3)/(.*)$ index.php?/$2 [QSA,PT,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/(apiv1|apiv2|apiv3)/
RewriteRule . /index.php [L]
</IfModule>
Nginx:
# nginx configuration by winginx.com
location / {
try_files $uri $uri/ @rewrite;
}
location @rewrite {
rewrite ^/(apiv1|apiv2|apiv3)/(.*)$ /index.php?/$2 last;
rewrite ^ /index.php last;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/var/run/php/php-fpm.sock; # 默认 PHP-FPM 套接字路径
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
我来讲讲 (0)