min117の日記

自分にとっての自分自身という謎

fedora40 Apache(httpd)で公開したはずのフォルダ内が「File not found」になるときは<IfModule dir_module> DirectoryIndex index.html index.cgi index.php </IfModule> を書けば治る

現象

大量にファイルあるはずなのに File not found. になってしまう。

対応

$ sudo vim /etc/httpd/conf/httpd.conf

<IfModule dir_module>

DirectoryIndex index.html index.cgi index.php

</IfModule>

$ sudo systemctl restart httpd

 

これでディレクトリがどれだけ深くてもちゃんと追って(その中にあるファイルを全て)リストしてくれる。

fedora30から40に移行したときに、httpd.confの移植がうまくいってなかったらしい。ぼちぼち直していく。