本帖最后由 yuyanke 于 2018-11-5 12:29 编辑
之前使用的是LNMP一键安装包,运行正常。
现在把源码迁移到宝塔的LNMP上, 软件版本都是一致的。
搬家后访问出现这个:
LNMP一键安装包上的网站配置文件如下:
- server
- {
- listen 80;
- server_name abc.com www.abc.com;
- index index.html index.htm index.php default.html default.htm default.php;
- root /home/wwwroot/abc/public;
- #error_page 404 /404.html;
- # Deny access to PHP files in specific directory
- #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }
- include enable-php.conf;
- location /nginx_status
- {
- stub_status on;
- access_log off;
- }
- #从URL中去掉index.php入口文件
- location /
- {
- if (!-e $request_filename) {
- rewrite ^(.*)[ DISCUZ_CODE_1 ]nbsp; /index.php?s=/$1 last;
- break;
- }
- }
- location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
- {
- expires 30d;
- }
- location ~ .*\.(js|css)?$
- {
- expires 12h;
- }
- location ~ /.well-known {
- allow all;
- }
- location ~ /\.
- {
- deny all;
- }
- access_log /home/wwwlogs/abc.log;
- }
复制代码
在宝塔的面板上已经选择了TP伪静态后访问提示403 Forbidden
请问在宝塔的LNMP平台上怎么设置?
备注,原网站输入域名后自动跳转为:www.abc.com/home/Login/index 这种格式
|
|