ls /var/www/html/
index.html
sample.html
buildinfo.txt
我如何不让 buildinfo.txt被外部访问到?
mydomai.com/index.html
mydomai.com/sample.html
都允许外部访问。
mydomain.com/buildinfo.txt
不允许外部访问,但是这个文件又仍然放在 /var/www/html 中。
ls /var/www/html/
index.html
sample.html
buildinfo.txt
我如何不让 buildinfo.txt被外部访问到?
mydomai.com/index.html
mydomai.com/sample.html
都允许外部访问。
mydomain.com/buildinfo.txt
不允许外部访问,但是这个文件又仍然放在 /var/www/html 中。
httpd.conf文件里有个配置项
添加一个
即可