我的Laravel显示主页,但其余的未在NGINX服务器中使用Aapanel找到

发布于 2025-02-14 00:21:58 字数 477 浏览 0 评论 0原文

我的Laravel 6在本地主机上运行良好,但是当我在domainsite.com上部署时,它仅显示主页,但其余链接显示了404页。我正在使用CentOS 7,Aapanel运行Nginx服务器。 php 7.4 mysql。 到目前为止,我有这个配置。

URL重写:

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  </IfModule>

已安装FileInfo,

我已在禁用功能(PutEnv和Symlink)中删除,但我仍然会遇到错误。 有人尝试过吗?谢谢你!

I have Laravel 6 running well on my localhost but when I deploy on domainsite.com, it only shows the main page but the rest of links shows 404 page not found. I am using CentOS 7, aaPanel running nginx server. PHP 7.4 MySQL.
I have this config so far.

URL Rewrite:

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  </IfModule>

fileinfo installed

I have removed in Disabled Functions(putenv and symlink) but still I get the error.
Anyone have tried this? Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文