Directory listing is not working with directory outside the server root
November 25, 2016 11:09PM
I have a directory that i want to turn into a file hosting page, which is outside the server root.

Here's the server root:
/var/server/nginx

And here's the directory that i want to host my files:
/root/Downloads/dl

The funny thing is, when i enable autoindex on the root location it worked fine, but when i put it on the "dl/" location, it either shows a 404 when requesting /dl or 403 when requesting /dl/
Any ideas?

Here's my nginx.conf:
https://0bin.net/paste/yld56HmmlAFZid8G#6tR24VNwHFTlqM5u2+RY5+SiFoNCN+n2M-wXQOb/

The permissions are all set to 755 so it won't be the probem.

Otherwise, how would you configure the nginx server for this purpose? -- your own nginx.conf files are welcomed plz paste it here: https://0bin.net

Also same post on serverfault.com if u prefer that: http://serverfault.com/q/817087/387551
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 216
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready