CentOS 5, cannot accept htaccess

1

I have problem with htaccess on my vps.I installed CentOS 5, uploaded site on /var/www/html and it works.But, htaccess isn't working.I tried to add AllowOverride All in httpd.conf, also uncomment Loadmodule rewrite...I tried to add "deny from all" but no success.It normally loads site..

What can I do ?

Thanks..

harisdev

Posted 2012-06-11T15:45:58.863

Reputation: 167

Answers

0

Make sure AccessFileName set to .htaccess

Search httpd.conf for AccessFileName directive. It defines name of the distributed configuration file:

grep -i AccessFileName httpd.conf

Make sure users are allowed to use .htaccess file

What you can put in these files is determined by the AllowOverride directive. This directive specifies, in categories, what directives will be honored if they are found in a .htaccess file. If this directive is set to None, then .htaccess files are completely ignored. In this case, the server will not even attempt to read .htaccess files in the filesystem.

grep -i AllowOverride httpd.conf

When this directive is set to All, then any directive which has the .htaccess Context is allowed in .htaccess files:

AllowOverride ALL

Save and close the file. Restart httpd:

service httpd restart

superuser

Posted 2012-06-11T15:45:58.863

Reputation: 3 297

Here's log : [code] [root@srv1 ~]# grep -i AccessFileName /etc/httpd/conf/httpd.conf

AccessFileName: The name of the file to look for in each directory

AccessFileName .htaccess

[root@srv1 ~]# grep -i AllowOverride /etc/httpd/conf/httpd.conf AllowOverride All

AllowOverride controls what directives may be placed in .htaccess files.

AllowOverride None

AllowOverride FileInfo AuthConfig Limit

for additional configuration directives. See also the AllowOverride

AllowOverride None
AllowOverride None
    AllowOverride None
 – harisdev  – 2012-06-11T15:55:47.090

Still nothing.. – harisdev – 2012-06-11T16:02:38.763