Access Denied You do not have permission to view this page. Error Code: 403

Hello ,

I have a server and some websites with Drupal and wordpress with Hestia as CP. Now from yesterday My websites are not working and I am getting the error msg

" Access Denied

You do not have permission to view this page.

Please check your credentials and try again.

Error Code: 403"

I recently updated to 1.4.1

How to fix this issue? Please help.

Anything usefull in the web log (/home/user/web/domain.tld/logs/)?

[Sun May 30 00:39:27.740215 2021] [autoindex:error] [pid 169459:tid 140099308201728] [client x8.x50.x15.23:0] AH01276: Cannot serve directory /home/pustak/web/mydomain.com/public_html/: No matching DirectoryIndex (index.html,index.cgi,index.pl,ind>

I dont know drupal, but foednt have it a public path?

Is index.php present in /home/pustak/web/mydomain.com/public_html/

Yes Index.php and .htaccess files are there.
indexphp

I tried to install new website with new user. It is working fine. But all the old websites are showing me 403 error. I want to fix all those websites on this server. Please help.

Hello, I solved this issue. I am posting here for someone same as me would be facing this issue.

This was drupal 9 specific issue. In Drupal 9 as we install it with composer. I have installed it in web directory in public_html directory. After that I changed document root form conf/web/domain.com/apache2.ssl.conf and set it to public_html/web.

I dont know how this happens but after auto update of Hestiacp this document root was reset to public_html.
I again went to conf file and change the document root and website started working.

Thank you.

Use a custom docroot or a custom template

I’ve the same issue. Quick install app installs drupal 9 with “base url” = “domain.tld/web”. If you change DocumentRoot directive, the site will crash.

I research on how to change “base url” on drupal documentation, but i didn’t find how to do it.
I need help too…
Sorry about my English!