apache - .htaccess not working at all -
i've got file accessible through web website typing http://www.mywebsite.com/myfile , server run on debian.
i'd put authentication .htaccess , .htpasswd when trying access previous url.
i'm quite new .htaccess , tried configure doc doesn't seems work since when try nothing change , when check error log i've got :
[error] [client ip] client denied server configuration: /home/file1/myfile/www/.htaccess
the content of .htaccess :
<directory /home/file1/myfile/www/> authuserfile /home/file1/myfile/.htpasswd authgroupfile /dev/null authname "my authentication" authtype basic require valid-user otions indexes followsymlinks multiviews allowoverride order allow,deny allow redirect permanent /.htaccess http://www.mywebsite.com/myfile serversignature off </directory> how may solve problem please ?
you can't use <directory> container in htaccess file. remove them have:
authuserfile /home/file1/myfile/.htpasswd authgroupfile /dev/null authname "my authentication" authtype basic require valid-user options indexes followsymlinks multiviews allowoverride order deny,allow deny redirect permanent /.htaccess http://www.mywebsite.com/myfile serversignature off (you have otions mispelled)
also, looking @ error, looks if trying access htaccess file directly, instead of myfile. it's possible there's configuration on server deny accessing htaccess files (or files start .).
Comments
Post a Comment