executing cgi programs in solaris(B89) needed urgent help,pls!

Hi all,

I am trying to execute cgi scripts on solaris, but everytime i get a internal server error...
The syntax of my .cgi script is correct as ive checked..
Steps i followed
1.started apache
2.The UNIX and Linux Forums - Learn UNIX and Linux from Experts (in opera)
3.places my cgi scripts in /var/apache2/2.2/cgi-bin
4.in the browser, localhost/cgi-bin/file.cgi
(this gives me an internal server error)

I read about cgiwrap, but unable to compile it on solaris...
If anyone has any idea where im going wrong please help..
Its kind of urgent that i figure this out..
Am using B89

Thanks

Hi,

check the user rights, apache runs under user nobody, is this
user able to start your scripts?

cu
lowbyte

what have you specified as your cgi-bin directory (ScriptAlias) in httpd.conf. A typical setup might be:

ScriptAlias /cgi-bin/ /usr/local/apache/cgi-bin/

you may also want to add permissions like `chmod a+x <file>`

The ScriptAlias has been set right..
corresponding cgi files are also placed in the appropriate dirs.
But from what i could read on the web, i found out that solaris requires a cgiwrap for cgi prgms to run, but im having compiling issues with cgiwrap..

If anyone has tried cgi prgms in solaris...Could you please guide me,step by step to resolve this issue?

PS: The apache issue has been sorted out...I had not included the hostname in /etc/hosts and thats the reason for not being able to resolve it :frowning:

Well...
What's the error you are getting?
Solaris 10 has a built-in user webservd for Apache. Are you mixing webservd and nobody/www ownerships of files/directories?
Do the cgi-bin scripts run on the command line when you su to the web user?
Are the cgi scripts php, asp, shell, perl?

AFAIK, Solaris doesn't require anything to run cgi scripts, other than the Apache server be properly configured.

Do the cgi-bin scripts run on the command line when you su to the web user?

yes they do.My machine is a single node.(I have root access as well,always)

Are the cgi scripts php, asp, shell, perl?

perl

    ScriptAlias /cgi-bin/ "/var/apache2/2.2/cgi-bin/"

This is what my httpd.conf reads.
So i placed the a test file in /var/apache2/2.2/cgi-bin (gave it "x" permission)
But when i run it in the browser i get a "internal server error"

Apache though is running fine!!!

Please help

So no error number or text other than "internal server error"?

I see that your cgi-bin alias is "/var/apache2/2.2/cgi-bin/
In the http.conf file, about 10 lines down from ScriptAlias, you should find the code.
Does the bold entry match ScriptAlias ?

# "/var/apache2/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/apache2/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory> 

i think hes getting this error in his log files: