[lug] cgi-bin Apache

D. Stimits stimits at idcomm.com
Sun Dec 10 04:04:55 MST 2000


John Starkey wrote:
> 
> Check out the mod_userdir section of httpd.conf. You'll need to add
> ExecCGI to the Options in the Directory container and I *think* everything

I found:
LoadModule userdir_module     modules/mod_userdir.so
AddModule mod_userdir.c
<Directory "/home/httpd/cgi-bin">
    AllowOverride None
    Options ExecCGI
    Order allow,deny
    Allow from all
</Directory>

> is smooth from there, ScriptAlias should be ok, I think, if you already

ScriptAlias does work with /home/httpd/cgi-bin/. I've added a package
that only partially does what I want: cgi-wrap. It allows individual
users to have cgi-bin directories specific to them, but it is somewhat
clumsy in use (functionality is good). The current ScriptAlias line just
points there:
ScriptAlias /cgi-bin/ "/home/httpd/cgi-bin/"

Is it possible for ScriptAlias to be given some sort of pattern matching
so it will allow on ~someuser/cgi-bin/ to recognize it and do some
relative path? E.G:
ScriptAlias ~.*[/]cgi-bin[/]  ~/cgi-bin/

(scenario borrows from regular expressions)

> have it working with ServerRoot. It's been a couple months since I
> config'd ~user/cgi-bin though. And that was my first.
> 
> This will atleast get you started.

Still I can't get http://localhost/~user/cgi-bin/myscript.cgi to run;
logs show I have permissions and all, but it lists the contents instead
of executing (they are chmod to exec). I figure I'll have to pick up an
Apache config book soon. From what I found, I may not be able to give an
individual user quite what I want without creating virtual domains for
each one (thus giving the domain its own cgi-bin as a whole instead of
per-user).

> 
> On Sat, 9 Dec 2000, D. Stimits wrote:
> 
> > I'm trying to set up a local linux machine to work similar to a Solaris
> > account I have (it uses Zeus, similar to the linux Apache). Right now
> > the linux box has a cgi-bin directory that works for the
> > http://localhost, but what I need is an individual per-user cgi-bin
> > directory. On the solaris account, for security reasons (which I tend to
> > agree with), cgi is allowed to execute only if it is in ~/cgi-bin/. For
> > the linux box, I'd like to mirror this on an individual per-user basis.
> > So I can use http://localhost/~someuser/myapp.cgi, and it will know to
> > search the cgi-bin directory of only that user. Is this a simple
> > configuration setup for Apache? I'd like to see any reference to a .cgi
> > file refused if it is not in the ~someuser/cgi-bin/ directory.
> >
> > D. Stimits, stimits at idcomm.com
> >
> > _______________________________________________
> > Web Page:  http://lug.boulder.co.us
> > Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> >
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug




More information about the LUG mailing list