While accessing the directories of website (http://webiste_name/directory_name) getting 403 forbidden error with below error logs –
Auto Index is disabled for [/home/cPanel_username/public_html/directory], access denied
1. ‘.htaccess’ issue –
# Don’t show directory listings for URLs which map to a directory.
Options -Indexes
I’ve commented the above code in the .htaccess file and all started working fine.
2. Apache web server issue –
Also, if you’re running your website on Apache web server then please make sure the ‘Indexes default‘ option is checked.
You can check that from WHM >> Service Configuration »Apache Configuration »Global Configuration >> Directory “/” Options >> Indexes default
It fixed my issue!