。htaccess错误:无效命令'AuthGroupFile'

问题描述 投票:4回答:2

在此之前,我在Windows上工作,而我的项目则正常工作。最近我搬到了ubuntu,我正在尝试在LAMP上安装项目。

我为此创建了主机(我直接通过本地主机运行的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

我的项目在smarty框架上。

有人可以帮助解决这个问题吗?

提前感谢

php apache .htaccess smarty
2个回答
6
投票

您可以尝试这个。

a2enmod authz_groupfile

2
投票

假设您使用的是Apache 2.2,这意味着您缺少了mod_authz_groupfile模块。

您需要查看服务器配置并查找包含以下内容的行:

LoadModule authz_groupfile_module modules/mod_authz_groupfile.so 

或类似的东西,并确保已将其注释掉。

否则,只需忽略AuthGroupFile指令,就好像您始终都没有使用它。

© www.soinside.com 2019 - 2024. All rights reserved.