Please I have been stocked for days now trying to clear the error in my browser console (403 net::ERR_ABORTED 403 (Forbidden)) and my static files is not been severed. Nginx Ubuntu
CodePudding user response:
go to this directory Open nginx.conf
then change this user to value as shown in this picture
I had this issue got it fixed by this. maybe it helps. user ubuntu
CodePudding user response:
cd /var/www/html/ then ls -la to see permission total 12 drwxr-xr-x 2 root root 4096 Sep 22 23:14 . drwxr-xr-x 3 root root 4096 Sep 22 23:14 .. -rw-r--r-- 1 root root 612 Sep 22 23:14 index.nginx-debian.html I noticed that .html has no -x permission I gave it a permission with this commands find /var/www/html/ -type d -exec chmod 755 {} ; find /var/www/html/ -type f -exec chmod 644 {} ; then la -la total 12 drwxr-xr-x 3 root root 4096 Sep 22 23:14 . drwxr-xr-x 14 root root 4096 Sep 22 23:14 .. drwxr-xr-x 2 root root 4096 Sep 22 23:14 html now html has -x permission sudo systemctl daemon-reload sudo systemctl restart gunicorn sudo systemctl restart nginx. This help fixed my problem and also big Thanks to hemal-patel changed my user too