newbie location error give error 403

Sergey A. Osokin osa at freebsd.org.ru
Wed Mar 9 01:44:07 UTC 2022


Hi Jim,

On Tue, Mar 08, 2022 at 04:55:53PM -0700, Jim Taylor wrote:
> This is my server configuration.  I want to display a PDF file.  If I 
> out the PDF in /data/images, it displays correctly in my browser 
> (Firefoc).  If I put the PDF in /data/documents I get error 403. 
> Obviously, I'm doing something stupid.  Is it really impossible to have 
> both a documents and an images directory>

[...]
> 
>          location /images/ {
>              root /data;
>          }
>          location /documents/ {
>              root /data;
>          }

Let's review the permissions on:

- those two directories, i.e. run 
  % ls -la /data/images
  % ls -la /data/documents

- those two PDF files, i.e. run
  % ls -la /data/images/thePDFfile.pdf
  % ls -la /data/documents/thePDFfile.pdf

-- 
Sergey A. Osokin



More information about the nginx mailing list