Apache and nginx prohibit access to specified files or directories

Have you tested that after Apache makes the directory prohibited from browsing, the txt file under the directory can still display the contents inside. For example: http://www.server110.com/linux/ This visit will report a 403 error, but if there are many txt under test, when you visit this txt; For example: http://www.server110.com/linux/a.txt, at this time all the content in a.txt will be exposed to the outside (sometimes this txt is a very confidential file), so it will not be safe. Similarly: I also have this problem after Nginx configuration, thanks to the help of NetSeek for the solution of this problem under Apache. The following is the way to limit this kind of things about Apache and Nginx: Apache configuration prohibits access 1. Forbid access to certain files/directories Add Files option to control, such as not allowing access to files with .inc extensions, and protecting php class libraries: Order allow, deny Deny from all Prohibit access to certain specified directories: (can be used for regular matching) Order allow, deny Deny from all Prohibit by file matching, such as prohibiting all access to pictures: Order allow, deny Deny from all Forbidden access for relative URL paths: Order allow, deny Deny from all Prohibit…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索