Kal*_*pit 4 php apache .htaccess smarty
在此之前,我在Windows上工作,我的项目运行正常。最近,我搬到了ubuntu,并尝试在LAMP上安装项目。
我为此创建了主机(我直接通过localhost运行的Windows),并且在运行时获取了它500 Internal server Error。
当我查看日志文件时,我得到了Invalid command 'AuthGroupFile', perhaps misspelled or defined by a module not included in the server configuration。
.htaccess文件
#php_value zend.ze1_compatibility_mode off
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /opt/lampp/htdocs/uniplex_mobile/.htpasswd
AuthGroupFile /dev/null
<Files manageurls.html>
require valid-user
</Files>
<Files addurl.html>
require valid-user
</Files>
<Files editurl.html>
require valid-user
</Files>
AddType application/x-httpd-php .php .htm .html
Run Code Online (Sandbox Code Playgroud)
我的项目是在聪明的框架上。
谁能帮助解决这个问题?
提前致谢
假设您使用的是 apache 2.2,这意味着您缺少 mod_authz_groupfile 模块。
您需要查看服务器配置并查找包含以下内容的行:
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
Run Code Online (Sandbox Code Playgroud)
或类似的东西并确保它被注释掉。
否则,只需忽略该AuthGroupFile指令即可,无论如何看起来您都没有使用它。