apache config httpd.conf file防止目录列表被浏览、敏感目录或文件限制IP访问

Options FollowSymLinks Includes ExecCGI

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Require all granted

<Files ~ "admin.php|authorized_keys">
order deny,allow
deny from all
#allow from 127.0.0.1
</Files>
</Directory>

<Directory ~ "admin|phpmyadmin">
order deny,allow
deny from all
#allow from 127.0.0.1
</Directory>

你可能感兴趣的:(apache config httpd.conf file防止目录列表被浏览、敏感目录或文件限制IP访问)