newbie location error give error 403

Jim Taylor jstaylor at xmission.com
Tue Mar 8 23:55:53 UTC 2022


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>

Jim Taylor



server  {
         listen 443 ssl;
         server_name  www.jstaylor.com;
         ssl_certificate /etc/nginx/ssl/combined.crt;
         ssl_certificate_key /etc/nginx/ssl/jstaylor.key;
         location / {
                 try_files $uri $uri/ =404;
                 root /data/www;
                 index index.html index.htm;
                 }
         location /css/ {
                 root /data;
                 }
         location /images/ {
                 root /data;
                 }
         location /documents/ {
                 root /data;
                 }
         }



More information about the nginx mailing list