> What does "request strip 1" actually do in that case?

>From the manpage:
Strip strips path components from the beginning of the request path
before looking up the stripped-down path at the document root.

So in your case:
        location "/admin/*" {
                fastcgi socket "/var/www/run/slowcgi.sock"
                root "/usr/local/lib/mailman/cgi-bin/admin"
                request strip 1
        }
if request is "admin/" then "admin" is stripped and "/" is sent to
document_root.


> 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.

So you expect the location to be triggered if the request is "admin"
but you configured the location to listen on "admin/"?
See the difference?

Next:
There is another misconfiguration in your http.conf: You use root
directive with a filename? Why? Manpage says: The directory is a
pathname within the chroot(2) root directory of httpd.
If you set root to a filename then you have to create multiple locations
for every request:
        location "/admin"--> root "/usr/local/lib/mailman/cgi-bin/admin"
        location "/list" --> root "/usr/local/lib/mailman/cgi-bin/list"
        location "/foo"  --> root "/usr/local/lib/mailman/cgi-bin/foo"
        ...
this could be quite tedious     thats why I would suggest:
        location "/*" --> root "/usr/local/lib/mailman/cgi-bin"


If you want mailman act on something like http://localhost/mailman/admin
then you can do:
        location "/mailman/*" {
                fastcgi
                root "/usr/local/lib/mailman/cgi-bin"
                request strip 1
        }

But please keep in mind that you have disabled chroot and this is not
recommended.
Maybe you want to consider to copy the needed files inside the chroot?
Or perhaps deploy mailman with something like gunicorn or uwsgi?

Reply via email to