当前位置:论坛首页 > Linux面板 > 求助

thinkphp程序从LNMP转移到宝塔的LNMP,出现问题

发表在 Linux面板2018-11-5 12:07 [复制链接] 1 1852

本帖最后由 yuyanke 于 2018-11-5 12:29 编辑

之前使用的是LNMP一键安装包,运行正常。
现在把源码迁移到宝塔的LNMP上, 软件版本都是一致的。

搬家后访问出现这个:
1.jpg

LNMP一键安装包上的网站配置文件如下:


  1. server
  2.     {
  3.         listen 80;
  4.         server_name abc.com www.abc.com;
  5.         index index.html index.htm index.php default.html default.htm default.php;
  6.         root  /home/wwwroot/abc/public;

  7.         #error_page   404   /404.html;

  8.         # Deny access to PHP files in specific directory
  9.         #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

  10.         include enable-php.conf;

  11.         location /nginx_status
  12.         {
  13.             stub_status on;
  14.             access_log   off;
  15.         }

  16.   #从URL中去掉index.php入口文件
  17.         location /
  18.         {
  19.             if (!-e $request_filename) {
  20.                 rewrite  ^(.*)[        DISCUZ_CODE_1        ]nbsp; /index.php?s=/$1  last;
  21.                 break;
  22.             }
  23.         }

  24.         location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  25.         {
  26.             expires      30d;
  27.         }

  28.         location ~ .*\.(js|css)?$
  29.         {
  30.             expires      12h;
  31.         }

  32.         location ~ /.well-known {
  33.             allow all;
  34.         }

  35.         location ~ /\.
  36.         {
  37.             deny all;
  38.         }

  39.         access_log  /home/wwwlogs/abc.log;
  40.     }
复制代码


在宝塔的面板上已经选择了TP伪静态后访问提示403 Forbidden
2.jpg

请问在宝塔的LNMP平台上怎么设置?
备注,原网站输入域名后自动跳转为:www.abc.com/home/Login/index 这种格式


使用道具 举报 只看该作者 回复
发表于 2018-11-5 14:11:17 | 显示全部楼层
https://segmentfault.com/q/1010000000130843
找到这个比较贴合的答案,但是没成功...
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

点击联系技术免费分析

工作时间:09:00至18:30

快速回复 返回顶部 返回列表