oupala / apaxy

a simple, customisable theme for your apache directory listing
https://oupala.github.io/apaxy/
GNU General Public License v3.0
1.86k stars 256 forks source link

Header & footer don't work with basic auth + mod_headers #47

Closed viranch closed 7 years ago

viranch commented 8 years ago

I came across a weird issue that causes the server to stop listing files altogether, here's my setup:

<Directory /var/www/html>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>
<IfModule mod_headers.c>
RequestHeader unset Authorization
</IfModule>
ProxyRequests Off
ProxyPass /backend http://127.0.0.1:3000
ProxyPassReverse /backend http://127.0.0.1:3000
<Location />
    AuthType Basic
    AuthName "By Invitation Only"
    AuthUserFile /etc/apache2/htpasswd
    Require valid-user
</Location>

With this setup and config pieces, style.css gets applied but there's no content in the table that's supposed to list the directory, neither does header/footer.html show up in response HTML.

This problem goes away if I remove basic auth, or if I disable mod_headers. I can't figure out how those might HeaderName & ReadmeName. Not sure if its an issue with this theme or my config.

AdamWhitcroft commented 7 years ago

@viranch I'll be 100% honest here and say this is way out of my league of understanding. I'm really sorry, but I have no idea.

viranch commented 7 years ago

@AdamWhitcroft no worries this is a very specific use case that probably nobody is ever going to hit.

If anybody stumbles here, I worked around this issue by changing mod_headers block to:

<Location /backend>
    RequestHeader unset Authorization
</Location>

Thanks anyway for the awesome theme @AdamWhitcroft !