gpt4 book ai didi

macos - 无法在 Lion Apache 上启用 htaccess 支持

转载 作者:行者123 更新时间:2023-12-01 15:50:52 26 4
gpt4 key购买 nike

我使用 MAMP 运行了一段时间,但后来开始认为进入 Apache 本身的骨骼并没有什么坏处。

所以默认选项对我来说非常有用,甚至还启用了几个虚拟主机,而且它们工作得很好。但是,我无法让 Apache 支持我的 htaccess 文件。

这是我的 Apache 配置 https://gist.github.com/1332527还有我的虚拟主机配置 https://gist.github.com/1332542

例如,我的网站在 min.local/index.php/some-url 工作,但在 min.local/some-url 失败,我得到 404。我读过很多关于将 AllowOverride 设置为 All 的博客文章在 httpd.conf 中,但没有任何区别。

我的 .htaccess 文件没问题,可以在生产环境中使用。

有什么建议吗?

谢谢,史蒂文

最佳答案

另外,确保查看位于/etc/apache2/users/username.conf 的用户特定的 conf 文件,并在那里设置 AllowOverride。

那里的设置将覆盖 httpd.conf 中的默认设置

只需将其设置为 All 或您在 httpd 中拥有的任何内容

关于macos - 无法在 Lion Apache 上启用 htaccess 支持,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7974757/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com