Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.htaccess Error : Invalid command 'AuthGroupFile'

before this i was working on windows and my project was working proper. recently i moved to ubuntu and i am trying setup project on LAMP.

i have created host for this (windows i was running directly through localhost) and when i am running it getting 500 Internal server Error.

when i looked in my log file i got Invalid command 'AuthGroupFile', perhaps misspelled or defined by a module not included in the server configuration.

.htaccess File

  #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

my project is on smarty framework.

can anyone help to solve this?

Thanks in advance

like image 643
Kalpit Avatar asked Sep 10 '14 19:09

Kalpit


People also ask

How do I disable all htaccess files in Apache?

If the AllowOverride directive is set to None then this will disable all .htaccess files. In order to verify this, you must open the Apache configuration file (typically either called httpd.conf or apache.conf) and check that the AllowOverride directive is set to AllowOverride All.

How do I validate a htaccess file?

.htaccess Check - This first tool gives you two options for validating your .htaccess file. You can either copy and paste the contents of your file directly into the tool or upload an .htaccess file. The tool will then check your syntax and highlight any lines that it finds errors on.

How to troubleshoot htaccess not working?

How to troubleshoot .htaccess not working # 1 #Using an .htaccess validator #. If you're having issues with the actual syntax of your .htaccess file, you can run its contents through an .htaccess validator. 2 Checking the Apache error log #. ... 3 Debugging with the Apache configuration file #. ... 4 Debugging mod_rewrite with logs #. ...

Why are my htaccess files conflicting with one another?

Since .htaccess file rules apply to the directory that they live in, as well as all other subdirectories, it can happen that two or more .htaccess files are conflicting with one another. To verify this, try disabling each additional .htaccess file you have one-by-one in order to see where the issue is.


1 Answers

You can try this.

a2enmod authz_groupfile
like image 113
nguaman Avatar answered Oct 03 '22 21:10

nguaman