security - Nginx disallow download file -


i'm facing issue include files in web app. stored in inc/ subdirectory. if open browser , point to: www.mysite.com/inc/ 404 not found ok.

if point to: www.mysite.com/inc/connection.inc file contains db info can download absolutely not good!

i have configuration in default website config:

location ~ /(ajax|inc|prints|temp) {   deny all;   return 404; }  

how can avoid files being downloaded?

found solution. simple

location ~ \.inc {   deny all; } 

the problem there 1 thread ion google issue.


Comments

Popular posts from this blog

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

sql server - SQL Query returns one result, does not return 0 or NULL result -