【问题标题】:500 Internal Server Error on local host xampp本地主机 xampp 上的 500 内部服务器错误
【发布时间】:2015-10-22 13:25:39
【问题描述】:

我正在尝试使用 Laravel 框架构建一个应用程序。

错误服务器遇到内部错误或配置错误,无法完成您的请求。

我检查了 httpd.conf 以检查 mode_rewrite 是否没有被评论。我还尝试将 httpd.conf 文件中的 AllowOverride "None" 更改为 "All"。有人可以帮我吗?

.htaccess 文件如下所示:

选项 - 多视图

RewriteEngine On

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

【问题讨论】:

  • Apache 的日志中是否有任何错误?
  • /.htaccess: 此处不允许的选项

标签: .htaccess xampp httpd.conf


【解决方案1】:

虽然这是一篇旧帖子,但我在 OSX 上遇到了同样的问题,我能够使用我找到的解决方案 here on stack 解决它,如下所示:

我在终端中运行了以下命令。

sudo chmod -R 755 laravel_project

然后运行以下命令授予 laravel 写入存储文件夹的权限

chmod -R o+w laravel_project/storage

注意:在终端中运行之前,请确保 xampp 欢迎页面“http://localhost/dashboard”正常运行,否则可能会有所不同

【讨论】:

    猜你喜欢
    • 2022-01-10
    • 2015-04-29
    • 2023-03-05
    • 2012-05-12
    • 1970-01-01
    • 2018-08-19
    • 1970-01-01
    • 1970-01-01
    • 2015-05-21
    相关资源
    最近更新 更多