Apache2 location dir and sub dir

Discussion in 'Installation/Configuration' started by francoisPE, Apr 12, 2021.

  1. francoisPE

    francoisPE Member HowtoForge Supporter

    Hello,
    i have ispconfig ubuntu20.04 perfect server. I try setup acces to mailman.

    I have a site https://mydomain.tld
    For this site, in ISPC Apache directive I need to put :
    "
    ProxyRequests Off
    ProxyPreserveHost On
    ProxyPass "/" "http://127.0.0.1:3000/"
    ProxyPassReverse "/" "http://127.0.0.1:3000/"
    <proxy>
    Order allow,deny
    Allow from all
    AuthUserFile /etc/mysite/file.htpswd
    AuthName "mysite"
    AuthType Basic
    require valid-user
    </proxy>
    "
    I want to acces mailman so I add after that apache directives :
    "
    <locationmatch ^/cgi-bin/mailman>
    ProxyPass "!"
    </locationmatch>
    <locationmatch ^/pipermail>
    ProxyPass "!"
    </locationmatch>
    "

    when in my browser I send : https://mydomain.tld/cgi-bin/mailman/listinfo/mailman
    I go to mailman page (proxypass ! seems ok), BUT, it asks me for authentification... like in <proxy>
    I also see that it doesn't redirect to https. However, I checked that option in ispconfig panel for that site...

    Any idea ?
     
  2. francoisPE

    francoisPE Member HowtoForge Supporter

    solved with
    <locationmatch /cgi-bin/mailman>
    ProxyPass "!"
    </locationmatch>
    <locationmatch /pipermail>
    ProxyPass "!"
    </locationmatch>
    "
    I don't understand why regex with ^ doesn't work in that case...
     

Share This Page