简体   繁体   中英

Server unable to read htaccess file

Hosted a new website. But when ever I open my website in the browser it is throwing the below error. Tried changing the .htaccess ReWriteRule but could not resolve it.

You don't have permission to access / on this server. Server unable to read htaccess file, denying access to be safe Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

This most likely means that apache doesn't have permission to read the directory where your .htaccess is located. Check the permissions on the folder where the file is located.

Ok, so I was facing this issue as well. Now keep in mind, the location of my application was a folder being shared with the Guest OS. Now what I had forgotten to do is to check, and make sure all permissions were enabled on said file on the HostOS.

So what I recommend is that you check the file permissions on the HostOS. Might be nothing you did, just something you forgot to do. Here is a screen shot of what I'm talking about.

Correct file permissions on left, zend skeleton displaying on right

I was unable to restart apache using my ID. So I restarted it using root user and hence this error. Later I changed access permission of httpd folder to 755 and restarted using my ID. The issue was resolved.

hello I think you have some problem with permission like it's was mentioned on your hosting you will find some number near your file like 755 those are the privilege of your file if there wasn't on that number 7 maybe 5 or 4 change it to 7 and like that your application could get the access and lunch your application

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM