I am new to nginx server. I tried to set a new url "/ images /" for serving images. I edited the bi.site file in the site support folder.
server { listen *:80; access_log /var/log/myproject/access_log; location / { proxy_pass http://127.0.0.1:5000/; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location /images/ { root /www/myproject/files_storage; } }
And in the directory / www / myproject / files _storage I put the file temp.txt.
When I put http://www.main_url/images/temp.txt , it shows that 404 was not found. What am I doing wrong? Did I miss something important?
source share