I’m tearing my hair out now as this should be such an easy fix but it’s not.
I’ve seen loads of questions relating this but I can’t find a definitive answer.
I’ve just configured a Ubunutu VPS with php8.3 and Nginx and everything is working perfectly. I created a phpinfo()
page and could see that working.
I then installed Laravel and created a server block but I’m getting the following error in my error.log:
directory index of /var/www/my-domain.com/public_html/” is forbidden
What is the correct way of setting the permissions so Nginx can display the page? Everything I’ve tried doesn’t work.
I’ve tried sudo chown -R root:www-data /var/www/
but that doesn’t work. I would have thought there is specific commands to run.
Can anyone please advise on what I’m doing wrong?