apacheproxyindexingmod-proxymod-autoindex

mod_autoindex hides directories used for mod_proxy


I did set up two proxies using mod_proxy. However when I list all the directories in the root with mod_autoindex, it does not show the otherwise existent and empty dummy directories with the same name as the proxies, not even if I use ShowForbidden.

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

ProxyPass /jenkins/ http://localhost:8080/jenkins/
ProxyPassReverse /jenkins/ http://localhost:8080/jenkins/

ProxyPass /redmine/ http://localhost:81/redmine/
ProxyPassReverse /redmine/ http://localhost:81/redmine/

<Directory />
    AllowOverride All
    Order Allow,Deny
    Allow from All
    Options -ExecCGI +FollowSymLinks +IncludesNOEXEC +Indexes +MultiViews -SymLinksIfOwnerMatch
    IndexOptions Charset=UTF-8 Type=text/html DescriptionWidth=* FancyIndexing FoldersFirst HTMLTable IconsAreLinks IgnoreCase NameWidth=* ShowForbidden VersionSort XHTML
</Directory>

Is there any way to force mod_autoindex to show these directories, and therefore the links to proxies?


Solution

  • Well, the least messy solution I managed is to just create a /jenkins_/ directory and redirect it to /jenkins/ with mod_rewrite.

    RewriteEngine on
    RewriteBase /jenkins_/
    RewriteRule ^(.*)$ /jenkins/$1 [R]
    

    It isn't exactly what I wanted but close.