Re: nginx prevent file download

2018-08-30 Thread Francis Daly
On Wed, Aug 29, 2018 at 09:15:26PM +0530, Kaushal Shriyan wrote: Hi there, > 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; > } It works for me. Are you sure that the config file

nginx prevent file download

2018-08-29 Thread Kaushal Shriyan
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