Score:0

Apache: Allow directory browsing while using DirectoryIndex directive

in flag

I have a local Apache 2.4 Docker container. My global vhost config is the following:

LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
<VirtualHost *:8080>
    ServerName localWeb
    DocumentRoot /app
    ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://php:9000/app/$1
    <Directory "/app">
        Options All Indexes FollowSymLinks
        AllowOverride All
        Require all granted
        DirectoryIndex index.php index.html index.htm
    </Directory>
</VirtualHost>

Directory browsing works when removing DirectoryIndex directive, but when it's there I get a File not found. web page instead.

I would like to be able to have directory browsing when there is no index.php, index.html nor index.htm in the directory.

Is that possible?

Chris avatar
it flag
Do you add a trailing slash when you request a directory? `/foo/` should work, when `/foo` won't.
in flag
Yes, I do, but still get "File not found.". Trailing slash is automatically added.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.