nginx禁止访问某个文件和目录(文件夹)

nginx禁止访问所有.开头的隐藏文件设置

location ~* /\.* {
deny all;
}

nginx禁止访问目录,

例如:禁止访问path目录

location ^~ /path {
deny all;
}

可以把path换成实际需要的目录,目录path后是否带有”/”,带”/”只禁止访问目录,不带”/”禁止访问目录中的文件

转载请保留:http://www.nginx.cn/125.html

42 thoughts on “nginx禁止访问某个文件和目录(文件夹)

  1. Pingback: Pre-Market Stocks Gold Silver Update Today New Futures Exchange for Gold

  2. Pingback: dang nhap w88top

  3. Pingback: Accidente Fatal Choque

  4. Pingback: custom aircraft decals

  5. Pingback: Replica Rolex Milgauss

  6. Pingback: i99bet

  7. Pingback: commercial roofing specialists

  8. Pingback: paragnost

  9. Pingback: พนันบอลออนไลน์

  10. Pingback: www.rajaqq8.com

  11. Pingback: elangqq login

  12. Pingback: porn

  13. Pingback: 안전바카라

  14. Pingback: bed bug extermination

  15. Pingback: Singles clubs

  16. Pingback: บริษัท ทิป ท็อป เอ็นจิเนียริ่ง จำกัด

  17. Pingback: 카지노사이트

  18. Pingback: porn

  19. Pingback: एक्स एक्स एक्स वीडियो

  20. Pingback: satta king

  21. Pingback: poker88

  22. Pingback: San Diego Criminal Lawyer

  23. Pingback: 바카라 게임 사이트

  24. Pingback: 바카라 사이트 가입 쿠폰

  25. Pingback: opinie

  26. Pingback: auto generated contents

  27. Pingback: qq online

  28. Pingback: 18k stamped fake rolex

  29. Pingback: sbobet

  30. Pingback: Dictator Dirk

  31. Pingback: dragon pharma cut mix

  32. Pingback: winnipeg used cars

  33. Pingback: generic viagra 100mg pills erections

  34. Pingback: buy chloroquine phosphate

  35. Pingback: Marc Menowitz CEO Apartment Corp

  36. Pingback: 먹튀재판소

  37. Pingback: buy/order Girls Scout Cookies Oil Vape Cartridges online use for pain, anxiety, sleep for sale near me bulk in usa uk nz canada australia overnight delivery

  38. Pingback: so de

  39. Pingback: English bulldog puppies for sale near me in USA Canada Uk Australia Europe cheap

  40. Pingback: Weed Vaporizers for Sale

  41. Pingback: go to this link

  42. Pingback: legal viagra over internet safe

Comments are closed.