设置不允许访问文件

在配置文件"/usr/local/apache2/conf/httpd.conf" 中添加内容:

<Files "*.txt">
    Require all denied
</Files>