httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Klavs Klavsen ...@vsen.dk>
Subject Re: [users@httpd] cgi-bin won't execute
Date Mon, 01 Sep 2003 14:30:23 GMT
On man, 2003-09-01 at 15:35, Joshua Slive wrote:
> From the looks of the number of errors below, I'm guessed you haven't
> spent much time reading the docs.  You can't learn to sue apache simply by
> reading the config file.  You need to actually consult the documentation.
> 
> On Mon, 1 Sep 2003, Klavs Klavsen wrote:
> > see this url f.ex. http://vsen.dk/helloworld.pl
> >
> > it just sends the content of the script instead of executing it :(
> >
> > my vsen.dk vhost is setup like this:
> >
> >     alias /helloworld.pl /path/to/docroot/helloworld.pl
> >     AliasMatch /favicon.ico /path/to/docroot/favicon.ico
> 
> These don't do anything.  Why are you mapping a URL to the same location
> as it already would go due to the DocumentRoot?
> 
Indeed they do something - they ensure that they don't get "caught" by
the AliasMatch /*

> >     AliasMatch /*       /some/php/script.php
> 
> Your regular expression matches zero or more "/"s.  You probably want to
> use
> AliasMatch /.* /some/php/script.php
> 
Nope. have a look at f.ex. http://vsen.dk/cv - wouldn't work with your
example - works fine here :)

> >
> >     <Files /path/to/docroot/helloworld.pl>
> 
> <Files> sections point to particular filenames, not to full paths.
> You probably want
> <Directory /path/to/docroot>
> <Files helloworld.pl>
> >         AllowOverride All
> >         Options ExecCGI Includes FollowSymlinks
> </Files>
> </Directory>
> 
> But most of those options don't work inside <Files> sections anyway.
> 
> Also, as has been pointed out, you have not actually designated any
> scripts to be executed.  See, for example:
> http://httpd.apache.org/docs-2.0/howto/cgi.html
> 
As I understand it, this should work:

    ScriptAlias /cgi-bin /path/to/docroot/cgi-bin
    AliasMatch /favicon.ico /path/to/docroot/favicon.ico
    AliasMatch /*       /some/php/script.php

    <Directory /path/to/docroot/cgi-bin>
        AllowOverride All
        AddHandler cgi-script .pl
        Options ExecCGI Includes FollowSymlinks
    </Directory>

But as you can see from http://vsen.dk/cgi-bin/helloworld.pl it doesn't
:(

-- 
Regards,
Klavs Klavsen, GSEC, klavs@EnableIT.dk, http://www.EnableIT.dk
Open Source Server, Security and Network Consulting
Phone: +45 3284 4372 Mobile: +45 2342 4372
PGP: 7E063C62/2873 188C 968E 600D D8F8  B8DA 3D3A 0B79 7E06 3C62

See our new CMS Hosting Service at http://www.VirkPaaNettet.dk

"Open Source Software - Sometimes you get more than you paid for."
-- 
Regards,
Klavs Klavsen, GSEC - kl@vsen.dk - http://www.vsen.dk
PGP: 7E063C62/2873 188C 968E 600D D8F8  B8DA 3D3A 0B79 7E06 3C62
See my new CMS Hosting Service at http://www.VirkPaaNettet.dk

Working with Unix is like wrestling a worthy opponent. 
Working with windows is like attacking a small whining child 
who is carrying a .38.				

Mime
View raw message