On Mon, 11 Mar 2024 21:16:05 +0300
Mark <markbsdmail2...@gmail.com> wrote:

> On Mon, Mar 11, 2024 at 11:16 AM Michael Hekeler <mich...@hekeler.com>
> wrote:
> 
> > I don't know this mailman script but...
> > Why did you strip first component from the request?
> > Are these cgi's in /usr/local/lib/mailman/cgi-bin/admin or in
> > /var/www/usr/local/lib/mailman/cgi-bin/admin?
> > What is your chroot setting in httpd.conf?
> > And IF you changed httpd chroot how do you start slowcgi(8)?
> > What/where is socket? Where is path?
> >
> >  
> Hi Michael,
> 
> What does "request strip 1" actually do in that case?
> The cgi files are in /usr/local/lib/mailman/cgi-bin/
> chroot setting in httpd.conf: chroot "/"
> Slowcgi starts with: slowcgi_flags="-p /" and it's socket path is:
> /var/www/run/slowcgi.sock
> 
> Slowcgi and httpd works fine. However two things I'd like to know;
> 
> As I asked, what does "request strip 1" do and if I really need that?
> 
> Secondly; how to combine two locations into one? So that;
> "/admin" and "/admin/" would get captured both.

you would have 2 locations like this
location match "/admin" {
        request rewrite "/admin/"
        }
location "/admin/" {
        ...
}

you should be able to generalize the 1st match to add a / to every
request not having a / at the end when it is not pointing to a file
(*.html/png/...) with something like this (note I've not tested this,
so use at own risk :) )

location match "([^.]+)[^/]$" {
        request rewrite "%1/"
}


Reply via email to