Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache and CGIs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
sKewlBoy
Guru
Guru


Joined: 03 Nov 2002
Posts: 406
Location: Portugal

PostPosted: Mon Dec 23, 2002 3:01 pm    Post subject: Apache and CGIs Reply with quote

I want to be able to run CGIs everywhere. I know I have to allow ExecCGI and SetHandler cgi-script. And I've done it. But kept getting error 500.

I decided to try the user cgi-bin example in commonapache2.conf. I copied /home/httpd/cgi-bin/printenv to ~user/public_html/cgi-bin/printenv.cgi and still get 500.
Checking error.log it say prematura end of headers but that must be a general a error... I dont know what to do...

When I had apache 1.3.24 it all worked so well... The following version became so complicated ... =\
Back to top
View user's profile Send private message
vericgar
Retired Dev
Retired Dev


Joined: 13 Dec 2002
Posts: 79
Location: Spokane, WA

PostPosted: Wed Dec 25, 2002 5:39 am    Post subject: Reply with quote

Check the first line of the script to make sure it's a valid path, something like the following:

#!/usr/bin/perl

Also make sure it's in Unix text format and not DOS text format (i.e. ASCII mode when uploading via FTP)

Check the permissions, make sure they are executable, ie. 755 rwxr-xr-x

Check the error logs, it should give a more informative error.

Check to see if you are using suexec (there will be a message in the logs) if so, read up on it and troubleshooting it over on the apache website http://httpd.apache.org.
_________________
+~+ Sometimes a good ole loving kick is all it needs +~+
Back to top
View user's profile Send private message
sKewlBoy
Guru
Guru


Joined: 03 Nov 2002
Posts: 406
Location: Portugal

PostPosted: Wed Dec 25, 2002 3:49 pm    Post subject: Reply with quote

I said I copied printenv (that default script) so you wouldnt have to say those basic lines line the interpreter path, permissions and so on...

But the tip on suexec is good, because I know it's on...
Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum