Juergen Daubert | 4 Dec 2005 12:31
Picon

Feature request

Hi Michiel and list,

while playing around with Trac [1] I came to the point where I 
missed a feature in mathopd.

To explain this I'll do a short comparison of apache and Mathopd
for some features:

  Apache        Mathopd
  ----------------------
  Alias     ->  Alias
  Directory ->  Location
  Location  ->  ?

As you can see we have nothing like the apache Location function.
IMHO this should be a Control block entry which do some things
when a ULR path matches, like setting env variables or asking for
passwords. See also the virtual trac example below.

Make this sense, what do you think ?

kind regards
Jürgen

BTW, I got trac running as FastCGI in a simular way I described
it for php in the Mathopd Wiki. It would be very nice if we had 
a Specials { FCGI } ;-)

[1] http://trac.edgewall.com/

(Continue reading)

Lou Kamenov | 5 Dec 2005 19:25
Picon

Re: Feature request

On 04/12/05, Juergen Daubert <jue <at> jue.li> wrote:
[..]
>  Control {
>     Alias /trac
>     Location /var/www/cgi-bin/trac.fcgi
>         External {"/usr/bin/cgi-fcgi -bind -connect /tmp/trac.sock" {*}}
>  }
>
>  Control {
>     PathMatch /trac/login
>         EncryptedUserFile On
>         Realm Trac
>         UserFile /etc/webaccess
>  }

Hi Juergen,

What is the exact difference between Alias and Apache's Location?
I guess you can change mathopds alias to take regex and do various
fancy things. It should be fairly easy to do it.

cheers,
l

Juergen Daubert | 6 Dec 2005 16:15
Picon

Re: Feature request

On Mon, Dec 05, 2005 at 06:25:56PM +0000, Lou Kamenov wrote:
> On 04/12/05, Juergen Daubert <jue <at> jue.li> wrote:
> [..]
> >  Control {
> >     Alias /trac
> >     Location /var/www/cgi-bin/trac.fcgi
> >         External {"/usr/bin/cgi-fcgi -bind -connect /tmp/trac.sock" {*}}
> >  }
> >
> >  Control {
> >     PathMatch /trac/login
> >         EncryptedUserFile On
> >         Realm Trac
> >         UserFile /etc/webaccess
> >  }
> 
> Hi Juergen,
> 
> What is the exact difference between Alias and Apache's Location?

A Mathopd Alias can only be used together with a Location keyword
an maps a URI to a filesystem path, whereas a apache Location is
a control-block that get respected if a URI matches.

In the above psydo-code the keyword PathMatch, which should be better 
called UriMatch or so, is exactly that what apaches Location is.
A request to http://<hostname>/trac/login should be passed to the
trac.fcgi script with the pathinfo 'login' after authentification was
successful (see Mathopd's PathInfo keyword).

(Continue reading)

Lou Kamenov | 6 Dec 2005 18:14
Picon

Re: Feature request

On 06/12/05, Juergen Daubert <jue <at> jue.li> wrote:
> On Mon, Dec 05, 2005 at 06:25:56PM +0000, Lou Kamenov wrote:
> > On 04/12/05, Juergen Daubert <jue <at> jue.li> wrote:
[..]
> A Mathopd Alias can only be used together with a Location keyword
> an maps a URI to a filesystem path, whereas a apache Location is
> a control-block that get respected if a URI matches.

Location is a bit more general; If you check the manual you can do:

...
Alias /google
Location http://www.google.com/
...

Though you have to add all the aliases you need.

> In the above psydo-code the keyword PathMatch, which should be better
> called UriMatch or so, is exactly that what apaches Location is.
> A request to http://<hostname>/trac/login should be passed to the
> trac.fcgi script with the pathinfo 'login' after authentification was
> successful (see Mathopd's PathInfo keyword).

i.e. PathInfo should be /trac/login? or do you get only '/' or?

Hm I have Instiki running with mathopd without any problems without needing
Apache's Location, see below:

Control {
  ScriptUser daemon
(Continue reading)

Juergen Daubert | 6 Dec 2005 20:49
Picon

Re: Feature request

On Tue, Dec 06, 2005 at 12:14:26PM -0500, Lou Kamenov wrote:

Hi Lou,

> On 06/12/05, Juergen Daubert <jue <at> jue.li> wrote:
> > On Mon, Dec 05, 2005 at 06:25:56PM +0000, Lou Kamenov wrote:
> > > On 04/12/05, Juergen Daubert <jue <at> jue.li> wrote:
> [..]
> > A Mathopd Alias can only be used together with a Location keyword
> > an maps a URI to a filesystem path, whereas a apache Location is
> > a control-block that get respected if a URI matches.
> 
> Location is a bit more general; If you check the manual you can do:
> 
> ...
> Alias /google
> Location http://www.google.com/
> ...
> 
> Though you have to add all the aliases you need.

Yes, I know about the redirect feature of the Location keyword, as
I think that I have a somewhat deep knowledege of all the keywords
mathopd has, but it doesn't help here ;-) 

> > In the above psydo-code the keyword PathMatch, which should be better
> > called UriMatch or so, is exactly that what apaches Location is.
> > A request to http://<hostname>/trac/login should be passed to the
> > trac.fcgi script with the pathinfo 'login' after authentification was
> > successful (see Mathopd's PathInfo keyword).
(Continue reading)

Lou Kamenov | 6 Dec 2005 21:21
Picon

Re: Feature request

On 06/12/05, Juergen Daubert <jue <at> jue.li> wrote:
> On Tue, Dec 06, 2005 at 12:14:26PM -0500, Lou Kamenov wrote:
[..]
> Yes, I know about the redirect feature of the Location keyword, as
> I think that I have a somewhat deep knowledege of all the keywords
> mathopd has, but it doesn't help here ;-)

Okay sorry about that ;)

> You can simplify this to the following, with the additional feature
> that nobody can access files in / even if he knows the exact filename.
>
>  Control {
>    ScriptUser daemon
>    Alias /
>    Location /path/to/instiki-ar/public/dispatch.cgi
>    Specials {
>         CGI { * }
>  }

well i couldnt do that as public has css and other things that the cgi need ;)

l


Gmane