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

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -