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…