Welcome! Log In Create A New Profile

Advanced

newbie location error give error 403

Jim Taylor
March 08, 2022 07:00PM
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;
                }
        }

_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

newbie location error give error 403

Jim Taylor March 08, 2022 07:00PM

Re: newbie location error give error 403

Sergey A. Osokin March 08, 2022 08:48PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 64
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready