【已解决】

小皮面板Liunx版,Laravel部署之后只能访问首页,别的全部404

server{

listen 80 ;

server_name layui.io ;

root /www/admin/layui.io_80/wwwroot/public/ ;

#301重定向

#rewrite ^(.*)$ $1 permanent;

#强制SSL

#rewrite ^(.*)$  https://$host$1 permanent;

#防盗链

location / {

#伪静态

#首页

root /www/admin/layui.io_80/wwwroot/public/;

index index.php index.html error/index.html;

}

#流量限制

#日志

access_log /www/admin/layui.io_80/log/nginx_access_$logdate.log main;

error_page  403  /error/403.html;

error_page  404  /error/404.html;

error_page  502  /error/502.html;

error_page  503  /error/503.html;

#处理PHP

location  ~ [^/]\.php(/|$) {

root /www/admin/layui.io_80/wwwroot/public/;

fastcgi_pass 127.0.0.1:7400;

fastcgi_split_path_info  ^(.+\.php)(.*)$;

fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_param  PATH_INFO $fastcgi_path_info;

include fastcgi.conf;

}

#DenyFiles

location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)

{

return 404;

}

}

问题比较着急?请联系QQ:760483
  • phpsutdy-爱好者
  • phpsutdy-爱好者    2020-07-13 09:46:321楼

    请配置正确的伪静态

    +添加回复

  • 回复

    谢猪哥关注,问题已解决

      作者 · 2020-07-14 17:11:02
    回复