Error 403 Forbidden


I’m facing an issue when deploying an app I coded .
When I connect to the site from client to the server I have an error 403 Forbidden from nginx .
From the server the command curl --unix-socket /run/gunicorn.sock localhost is working well.

Can you help me to fix / troubleshoot the issue


2023/06/24 01:44:51 [error] 19481#19481: *45 directory index of "/home/**/docker-travail/django_webapplifinance/" is forbidden, client:, server:, request: "GET / HTTP/1.1", host: ""

ALLOWED_HOSTS = ['localhost','','']


server {
    listen 8010;
    server_name raspberrpy ;
    location = /favicon.ico { access_log off; log_not_found off;}
    location /static/ { root /home/***/docker-travail/django_webapplifinance/static ; }
    proxy_set_header        Host $host;
    root /home/***/docker-travail/django_webapplifinance/;

    location / {
        include proxy_params;
        autoindex on;
        proxy_pass http://unix:/run/gunicorn.sock ;
        try_files $uri @proxy_to_app;

    location @proxy_to_app {
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto $scheme;
      proxy_set_header Host $http_host;
      # we don't want nginx trying to do something clever with
      # redirects, we set the Host: header above already.
      proxy_redirect off;