Current time: 04-19-2024, 06:13 PM Hello There, Guest! (LoginRegister)


Thread Closed 
Run CGI Script from cgi-bin 500 error
Author Message
mwlake Offline
Junior Member
*

Posts: 18
Joined: Oct 2008
Reputation: 0
Post: #1
Run CGI Script from cgi-bin 500 error
Hi All,
Most likely I missed something simple but I am having a real Headache getting a simple hello.cgi script to run from the cgi-bin/ folder of my domain.
Yes, Chmod is set 755, uploaded using ascii.

From command-line in ssh no syntax errors in script.

In my browser, when I type in the address field: http://www.domainname.com/cgi-bin/hello.cgi I always get 500 error - Internal Server Error. I assume ISPCP is blocking this for security reasons, the question is how to unblock.

ISPCP 1.0.0 Omega
build:20090225
Codename:Priamos

Hope someone can help
05-22-2009 07:20 PM
Visit this user's website Find all posts by this user
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #2
RE: Run CGI Script from cgi-bin 500 error
Quote:Yes, Chmod is set 755, uploaded using ascii.
You must also set the correct "vu20XX" User and Group for this file.

Greez BeNe
05-22-2009 07:30 PM
Visit this user's website Find all posts by this user
mwlake Offline
Junior Member
*

Posts: 18
Joined: Oct 2008
Reputation: 0
Post: #3
RE: Run CGI Script from cgi-bin 500 error
BeNe, Thanks for your reply.

cgi file is set for proper: chmod:755 chown:vu20xx chgrp:vu20xx
and I'm still getting 500 error

I had to delete and mkdir:cgi-bin maybe permissions for the cgi-bin/ folder are wrong. What should they be? chmod:??? chown:?? chgrp:??

cgi-bin/ also 755 and site ftp owner and group vu20xx should work but doesn't.
I'm using a 64bit Ubuntu 8.04 LTS. mod_fcgi on ISPCP. Maybe during installation there were some silent errors, because the setup went smooth with no visible errors.

Let me know what you'd suggest, please. I'll add your answer to my Knowledge database.
(This post was last modified: 05-22-2009 09:20 PM by mwlake.)
05-22-2009 09:08 PM
Visit this user's website Find all posts by this user
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #4
RE: Run CGI Script from cgi-bin 500 error
Are there any Log entries about the Error ?
Check you default.error, suexec.log

Quote:had to delete and mkdir:cgi-bin maybe permissions for the cgi-bin/ folder are wrong. What should they be? chmod:??? chown:?? chgrp:??
ispCP itself creates this Folder, so there is no need to delete it.

For example:
Code:
drwxr-xr-x  2 vu2002 vu2002   4096 Dec 18 12:20 cgi-bin

Greez BeNe
05-22-2009 09:46 PM
Visit this user's website Find all posts by this user
ephigenie Offline
Project Leader
*******
Administrators

Posts: 1,578
Joined: Oct 2006
Reputation: 15
Post: #5
RE: Run CGI Script from cgi-bin 500 error
take a look in into your /var/log/apache2/error.log or the error-log for you specific domain.

I'm quite sure you'll find the error there.
mod_fcgi is for fastcgi and not for normal cgi-bin things..
Therefor you'll have to use mod_actions ...
05-26-2009 06:50 PM
Visit this user's website Find all posts by this user
cmendes0101 Offline
Junior Member
*

Posts: 16
Joined: Dec 2009
Reputation: 0
Post: #6
RE: Run CGI Script from cgi-bin 500 error
I'm also having this issue too. Everything seems correct. The apache logs do not show anything besides that a 500 came up
12-17-2009 12:14 PM
Find all posts by this user
motokochan Offline
Member
***

Posts: 274
Joined: Jul 2008
Reputation: 1
Post: #7
RE: Run CGI Script from cgi-bin 500 error
First, have you confirmed that this properly handles CGI mode? You can't just spit back raw output. The script has to return certain headers back in the output to Apache or you'll get a 500-series error.

The site error logs are the best thing to check, they will usually have more detail. At least for me, the logs are in /var/log/httpd/users/. Filename format is domain-error.log.

Also, check the suexec log, which for me, is at /var/log/httpd/suexec.log.
(This post was last modified: 12-17-2009 12:47 PM by motokochan.)
12-17-2009 12:46 PM
Visit this user's website Find all posts by this user
cmendes0101 Offline
Junior Member
*

Posts: 16
Joined: Dec 2009
Reputation: 0
Post: #8
RE: Run CGI Script from cgi-bin 500 error
Ok I found a different log that shows an actual error at
/var/log/apache2/users/DOMAIN-error.log
Code:
[Thu Dec 17 04:26:32 2009] [error] [client 173.58.48.72] Symbolic link not allowed or link target not accessible: /var/www/virtual/DOMAIN/cgi-bin/mt

















/cgi-bin/mt

This is for a different error
12-18-2009 02:40 AM
Find all posts by this user
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #9
RE: Run CGI Script from cgi-bin 500 error
What does suexec.log say? Additionally, cgis should have 0750 or 0700 permissions, not 0755...
(This post was last modified: 12-18-2009 02:53 AM by kilburn.)
12-18-2009 02:53 AM
Visit this user's website Find all posts by this user
cmendes0101 Offline
Junior Member
*

Posts: 16
Joined: Dec 2009
Reputation: 0
Post: #10
RE: Run CGI Script from cgi-bin 500 error
(12-18-2009 02:53 AM)kilburn Wrote:  What does suexec.log say? Additionally, cgis should have 0750 or 0700 permissions, not 0755...

suexec.log does not have anything related in there.

What permission should the actual cgi-bin folder have? I set it to 0750

I checked the other logs again now im getting this:

[Thu Dec 17 20:47:30 2009] [crit] [client 173.58.48.72] (13)Permission denied: /var/www/virtual/chrismendes.us/cgi-bin/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

There is no .htaccess file in there. Should there have been? No other domain has htaccess either.
12-18-2009 06:57 AM
Find all posts by this user
Thread Closed 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)