Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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..

share|improve this question
add comment

1 Answer

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
share|improve this answer
    
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 –  Haris Muharemović Jun 11 '12 at 15:55
    
Still nothing.. –  Haris Muharemović Jun 11 '12 at 16:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.