Welcome! Log In Create A New Profile

Advanced

nginx prevent file download

August 29, 2018 11:48AM
Hi,

I am running nginx webserver and i have set the below location block in
nginx.conf configuration file to prevent a file to download. When i hit
http://example.com/web.config on the browser, the web.config file gets
downloaded. It is not working.

location ~* \.(config)$ {
deny all;
}


I will appreciate if somebody can pitch in for help. Thanks in Advance.

Best Regards,

Kaushal
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx prevent file download

kaushalshriyan August 29, 2018 11:48AM

Re: nginx prevent file download

Francis Daly August 30, 2018 03:48AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 147
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