Apache Server configuration support - getting cgi scripts to run

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > November 2007 > getting cgi scripts to run





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author getting cgi scripts to run
scott

2007-10-16, 7:24 pm

I am trying to get a cgi script, really a PERL script, to run. When
I try to run it from a web browser using a URL of:
http://www.abc.com/first.pl I receive this error:
Object not found! and the log says:
File does not exist: /home/abc/html/first.pl

Now when I try this URL: http://www.abc.com/cgi-bin/first.pl I still get
an Object Not Found! still. The log says: script not found or unable to
stat: /srv/www/cgi-bin/first.pl

What I have in the vhost.conf file for this host is:
<Directory "/home/abc/html/cgi-bin">
AddHandler cgi-script .cgi .pl
Options ExecCGI
SetHandler cgi-script
</Directory>

The first.pl script is in the /home/abc/html/cgi-bin directory and has a
permission of rwxrwxr-x.

So what am I doing wrong?

Thanks!
HansH

2007-10-17, 7:36 am

"scott" <svetter@ameritech.net> schreef in bericht
news:FJaRi.5070$sm6.3708@nlpi069.nbdc.sbc.com...
> I am trying to get a cgi script, really a PERL script, to run. When I
> try to run it from a web browser using a URL of:
> http://www.abc.com/first.pl I receive this error:
> Object not found! and the log says:
> File does not exist: /home/abc/html/first.pl
>
> Now when I try this URL: http://www.abc.com/cgi-bin/first.pl I still get
> an Object Not Found! still. The log says: script not found or unable to
> stat: /srv/www/cgi-bin/first.pl
>
> What I have in the vhost.conf file for this host is:
> <Directory "/home/abc/html/cgi-bin">
> AddHandler cgi-script .cgi .pl
> Options ExecCGI
> SetHandler cgi-script
> </Directory>
>
> The first.pl script is in the /home/abc/html/cgi-bin directory and has a
> permission of rwxrwxr-x.
>

Commonly on a filesystem cgi-bin is not below but rather aside of html:
/home/abc/html
/home/abc/cgi-bin

Some directive alike
<scriptalias /cgi-bin /home/abc/cgi-bin >
apparently maps this cgi-bin folder to the URL and overrules -or masks- the
quoted <Directory ...> block.


HansH


Youcantoo

2007-11-19, 1:46 am

HansH wrote:
> "scott" <svetter@ameritech.net> schreef in bericht
> news:FJaRi.5070$sm6.3708@nlpi069.nbdc.sbc.com...
[vbcol=seagreen]

Should not the permission of the file be rwxr-xr-x (755) not rwxrwxr-x (775)

[vbcol=seagreen]
> Commonly on a filesystem cgi-bin is not below but rather aside of html:
> /home/abc/html
> /home/abc/cgi-bin
>
> Some directive alike
> <scriptalias /cgi-bin /home/abc/cgi-bin >
> apparently maps this cgi-bin folder to the URL and overrules -or masks- the
> quoted <Directory ...> block.
>
>
> HansH
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com