Reputation: 23
I have set up a virtual host using nginx, but I am encountering a 403 Forbidden. This issue only occurs in Ubuntu 22.04, whereas the same configuration works fine on Ubuntu 20.04.
I want to solve 403 Forbidden error for nginx virtual host
Upvotes: 2
Views: 210
Reputation: 938
Due to the increased security in Ubuntu 22.04, many users are encountering the same issue. To resolve this, you need to add your user to the "www-data" group.
sudo usermod -g www-data <YOUR_USERNAME>
i.e sudo usermod -g www-data ubuntu
Upvotes: 2