Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Enabled autoindex. Still throws 404 error

$
0
0
I am getting 404 Not Found error on one directory I enabled autoindex.

Server: Ubuntu 14.0

My config is as follows

server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;

root /usr/share/nginx/html;
index index.php index.html index.htm;

# Make site accessible from http://localhost/
server_name localhost 5.135.xx.xx;

location /downloads {
autoindex on;
autoindex_exact_size off;
}

location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}


Please help. I have searched Google and tried all different configs and still not solved.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>