Friday 19 February 2016

Tech Talk...Apache 403 forbidden error

I have worked with apache a lot during my career and I am never able to remember all the configurations required there for various apache behavior tuning at different levels but one thing that has surely helped me in solving the 403 errors time and again, particularly with the home page loading after the first time apache is configured on the fresh environment is this:

<Directory />
    Order allow,deny
    Allow from all
    Require all granted
</Directory>


Make sure the right permissions are provided at the root directory level and you should be good to go.
(With the assumption that you can safely allow all the incoming requests to pass through). Hereafter you can do VirtualHost specific configurations for allowing or denying certain requests as per your project requirement.

No comments:

Post a Comment