0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ubuntu はhttpd.confではなくapache2.conf

0
Posted at

DirectoryIndexディレクティブで指定したデフォルトファイル(index.htmlなど)が存在しないディレクトリにWebブラウザでアクセスすると、Apacheの設定によってはそのディレクトリのファイル一覧を表示する。

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

の部分にある、

    Options Indexes FollowSymLinks

の行を、

    Options -Indexes FollowSymLinks

とありますが!!
ubuntu はhttpd.confではなくapache2.conf
vi /etc/apache2/apache2.conf
Options -Indexes +FollowSymLinks

<Directory /var/www/>
        Options -Indexes +FollowSymLinks
        #AllowOverride None
        AllowOverride All
        Require all granted
</Directory>

の様に設定変更。

systemctl reload apache2

にて非表示に!!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?