How to disable directory indexing from apache2 when going to the server's root?

后端 未结 6 2257
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-12 12:11

I need to disable that indexing when I enter on my root directory on a apache2 server, any tips?

6条回答
  •  后悔当初
    2021-02-12 12:53

    sudo nano /etc/apache2/apache2.conf

    Located this section in the file

    Add a minus to Indexes (Denied)

    Add a plus to FollowSymLinks

    Result : Options -Indexes +FollowSymLinks AllowOverride None Require all granted

    Works in Raspbian

    You'll get the message : "You don't have permission to access "Directory" on this server."

提交回复
热议问题