Permission denied: /var/www/abc/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable?

PHPLover picture PHPLover · Dec 17, 2013 · Viewed 132.3k times · Source

Hi all I'm using PHP for my website and ubuntu linux on my system. I got the above error in error.log file of apache, even after configurating everything properly. I did a lot of research on this but couldn't be able to resolve the issue. Can anyone please help me in this reagard? Following is my .htaccess file in abc directory. Can anyone please help me in this regard?

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName abc.org
AuthUserFile /home/abc/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/abc/public_html/_vti_pvt/service.grp
Options -Indexes

RewriteEngine On
RewriteRule ^alumni$ alumni.php
RewriteRule ^student$ student.php
RewriteRule ^view_alumni_article/view/([0-9]+)$ view_alumni_article.php?op=view&article_id=$1

Answer

Jon Lin picture Jon Lin · Dec 17, 2013

Make sure that the htaccess file is readable by apache:

chmod 644 /var/www/abc/.htaccess 

And make sure the directory it's in is readable and executable:

chmod 755 /var/www/abc/