title: 403 Forbidden nginx in path home/project/media2
body: <p>I'm getting a 403 forbidden from nginx, but I've already added the permissions on the folder/files, being 755 for folder and 644 for files.
  in this case I have already inserted autoindex on; autoindex_exact_size off; but the problem still continues, could anyone help me with this</p>
  
  <p>Here's my nginx file</p>
  
  <pre><code>       location ~ ^/media2/detail/ {
         alias /home/sftpserver/projects/myproject/media2/detail;
         autoindex on;
         autoindex_exact_size off;
         location ~*  \.(jpg|jpeg|png|gif|ico|css|js|xlsx|dat|mod|glp|Ink|out)$ {
                      expires 30d;
                  }
       }
  </code></pre>
  
  <p>Here's my nginx access.log file</p>
  
  <pre><code>     154.39.13.17 - - [13/Apr/2018:10:44:55 -0300] "GET /media2/detail/execution_detail_252.xlsx/ HTTP/1.1" 403 192
       "https://subdomion.dominiom.com.br" "Mozilla/5.0 (Windows NT 10.0;
       Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
       Chrome/65.0.3325.181 Safari/537.36" "-"
  </code></pre>
  
  <p>Here's my nginx error.log file</p>
  
  <pre><code>2018/04/13 10:41:47 [error] 12737#0: *1 directory index of "/home/sftpserver/projects/myproject/media2" is forbidden, client: 169.39.13.127, server: subdomion.dominiom.com.br, request: "GET /media2/detail/execution_detail_251.xlsx/ HTTP/1.1", host: "subdomion.dominiom.com.br", referrer: "https://subdomion.dominiom.com.br"
  </code></pre>
  
  <p>If someone can help me, I will be enormously grateful.</p>