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.
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.