ApacheのIndexesが無効にならないとき
ApacheのOptionsのIndexesを無効にしたい場合、うちの場合、VirtualHostディレクティブで、
| 1 2 3 4 5 6 |     <Directory "/var/www/html/環境名">         AllowOverride All         Options +FollowSymLinks -Indexes         DirectoryIndex index.php index.html         Require all granted     </Directory> | 
とすることが多いですが、/icons/でアクセスすると、なぜかIndexesが効いてしまい、表示されてしまうことがありました。
Apacheのほかの設定を見てみると、autoindex.confの中に、該当の設定があるみたいだったので、
| 1 2 3 4 5 6 7 8 | #Alias /icons/ "/usr/share/httpd/icons/" # #<Directory "/usr/share/httpd/icons"> #    #Options Indexes MultiViews FollowSymlinks #    Options MultiViews FollowSymlinks #    AllowOverride None #    Require all granted #</Directory> | 
その該当箇所をコメントアウトすることで、/icons/も404ページに遷移するようになりました。
この投稿へのトラックバック
トラックバックはありません。
- トラックバック URL

 
                
この投稿へのコメント