【发布时间】:2017-10-27 08:22:48
【问题描述】:
我在本地机器上使用的 Apache 版本是 2.4,当我在浏览器中访问我的应用程序的 url 时,我得到了这个错误。
/var/www/app/public/.htaccess: Invalid command 'Allow', perhaps misspelled or defined by a module not included in the server configuration
这是我的 .htaccess 文件的内容:
SetEnvIf Request_URI ^/SOME_ENPOINT/ noauth=1
SetEnvIf Request_URI ^/auth/ noauth=1
AuthUserFile /var/www/app/.htpasswd
AuthType Basic
AuthName "APP Login"
Require valid-user
Allow from env=noauth
我想我会在 .htaccess 文件中删除下面这行代码。
Allow from env=noauth
我已经启用了我的 apache 服务器的 mod_env 模块。
有没有办法解决这个问题,但使用环境变量 noauth?谢谢:)
【问题讨论】:
标签: apache .htaccess apache2.4