Home  >  Q&A  >  body text

apache - Is it necessary to hang a blank index.html after directory browsing permission is turned off?

Apache turns on the directory browsing permission by default (I installed independent Appche 2.2 and XAMPP under Windows and both turned it on, and I don’t know much about other versions). At the same time I noticed

WordPress places a blank index.php in some directories:

<?php
// Silence is golden.

Typecho does not have it.

Today I had a "dispute" with my friends in the group: After turning off the directory browsing permission, is it necessary to hang a blank index.html?

给我你的怀抱给我你的怀抱2713 days ago626

reply all(3)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-16 17:05:38

    Thanks for the invitation, I haven’t been to SF in a long time.
    From a security perspective, I personally think it’s okay to have one or not. After all, it won’t affect the normal operation of the website program. But if the environment deployment is not handled safely, some "big black and wide" incidents can still be avoided to a certain extent index.html-

    reply
    0
  • 迷茫

    迷茫2017-05-16 17:05:38

    Theoretically it is not necessary.
    Hanging a blank index.html is probably to prevent forgetting to set directory permissions after deploying a new environment

    reply
    0
  • 世界只因有你

    世界只因有你2017-05-16 17:05:38

    I think it is necessary.

    What if I accidentally open it one day in the future? What if I change the environment in the future?

    Be prepared and prepare for a rainy day

    reply
    0
  • Cancelreply