I have created a simple app using AngularJS. When I tried to host that project in my website http://demo.gaurabdahal.com/recipefinder it shows the following error:
Forbidden
You don't have permission to access /recipefinder on this server. Server unable to read htaccess file, denying access to be safe
But if I go to http://demo.gaurabdahal.com/ it displays "access denied" message as expected, that I have printed. But why is it unable to open that AngularJS projects "recipefinder". If I tried to put a simple HTML app there, it opens just fine.
The same AngularJS project works fine when I host that in github (http://gaurabdahal.github.io/recipefinder)
I can't understand what's wrong.
In my case apache was somehow configured wrong so I had to set permissions to all parent dirs too. Just setting permission to .htaccess (and it's parent dir) didn't work.
GoDaddy shared server solution
Basically, I had the same issue when trying to deploy separate Laravel project on a subdomain level.
File structure
Solution
select following checkboxes
Click change permissions
Job done!
Just my solution. I had extracted a file, had some minor changes, and got the error above. Deleted everything, uploaded and extracted again, and normal business.
You need to run these commands in
/var/www/html/
or any other directory that your project is on:In my case (apache web server) I use
www-data
foruser
andgroup
"Server unable to read htaccess file" means just that. Make sure that the permissions on your
.htaccess
file are world-readable.