php - .htaccess 错误 : Invalid command 'AuthGroupFile'

标签 php apache .htaccess smarty

在此之前,我在 Windows 上工作,我的项目运行正常。最近我搬到了 ubuntu,我正在尝试在 LAMP 上设置项目。

我为此创建了主机(我直接通过本地主机运行的 Windows),当我运行它时出现 500 Internal server Error

当我查看我的日志文件时,我得到了无效命令“AuthGroupFile”,可能拼写错误或由未包含在服务器配置中的模块定义

.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 框架上。

谁能帮忙解决这个问题?

提前致谢

最佳答案

你可以试试这个。

a2enmod authz_groupfile

关于php - .htaccess 错误 : Invalid command 'AuthGroupFile' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25773547/

相关文章:

php - 如何在 PHP 中传递值并运行 C 程序(Web 应用程序)

php - 使用在布局脚本中调用的助手获取 zend View 的属性

将数据插入数据库的 PHP 脚本在执行时返回成功,但记录未插入数据库?

.htaccess 将图像文件重写为 php 脚本

php - 如何在 php 中创建动态 URL?

.htaccess - 将我的网站从动态 CMS 更改为静态 HTML。我应该301重定向还是使用其他方法?

php - Yii:从模型的嵌套连接表访问属性

php - 在 centos 中从源代码构建 php 5.5,缺少 mod_php

apache - 与 docker 一起使用/etc/hosts

apache - 如何在一个 .htaccess 文件中编写多个重写条件和规则以重定向 url?