Welcome! Log In Create A New Profile

Advanced

Enabled autoindex. Still throws 404 error

Posted by tharun518 
Enabled autoindex. Still throws 404 error
September 16, 2014 01:52AM
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.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 139
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready