How to configure my Apache/1.3.4 to run CGI ?

How to configure my Apache/1.3.4(Unix)
Suse/6.0 in order to activate my CGI script.
I have written a JAVA CGI and I am trying to call it via a Script
I am getting this error from my httpd.error_log

my error ----------------->
/usr/lib/java/bin/java: /etc/rc.config:Permission denied
Premature end of script headers: /usr/local/httpd/cgi-bin/get.cgi
--------------------------->end of error

Thanks
Neta :}


netaAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
shmoo27Connect With a Mentor Commented:
My guess is that the /etc/rc.config file is not readable by the user under which you are running Apache.

The apache config file httpd.conf specifies the user under which the server runs - this is "nobody" by default.

Make sure that user can read the /etc/rc.config file, by changing the mode (probably to 744).
0
 
netaAuthor Commented:
Thank you shmoo27 i succeed with runing
java thanks to your help!
Before i will give you your point
mybe you know why i can't pass parameters to my java cgi via the []vargs?
0
 
shmoo27Commented:
CGI programs are invoked by the server,
and I don't think the CGI protocol supports passing command line arguments.
If you want to pass information to your CGI, you can specify the link like this:

http://server/path-to-cgi/<arguments>

The /<arguments> part will be placed in your environment in an environment variable called PATH_INFO.  You can then parse out your arguments from that.

Hope this helps!
0
All Courses

From novice to tech pro — start learning today.