skip to Main Content

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

2

Answers


  1. Chosen as BEST ANSWER

    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


  2. go to this directory enter image description here Open nginx.conf
    then change this enter image description here user to value as shown in this pictureenter image description here
    I had this issue got it fixed by this. maybe it helps. user ubuntu

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search