I know this is a common problem. i've read multiple posts about it, but none of them worked for me.
I have a fresh install of Grav running locally, just to test it. It is running over Nginx.
When i start it over nginx, with a custom server_name, it gives-me a blank page. by going on localhost, i am met with the error " InvalidArgumentException
The directory "/var/www/html/grav/cache/doctrine/9565bf08" does not exist and could not be created.".
I dont think the problem is with nginx. i created a php.php and a index2.html to test it and it works.
on the other hand, when i use the grav bult-in web server, it runs perfectly.
The issue you're experiencing is likely related to directory permissions. The error message indicates that the server cannot create the required directory under /var/www/html/grav/cache/doctrine.
To resolve this, first check and update the permissions for the cache directory and its parent directories.