CGI don't work.

Status
Not open for further replies.

filou93

New Member
Messages
1
Reaction score
0
Points
0
Hi,
I need help to make cgi works.
I've put my cgi scripts in Home/public_html/scgi-bin
I have set permissions to 755
But I get the following error:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@keane.elementfx.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

In CGI center --> Wrapper i get this message:
You will need to place the CGI Scripts that you want to run with your userid in the directory...I didnt know how to put my userid.

Thanks

 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
I have set permissions to 755

On both scgi-bin and the script?

In CGI center --> Wrapper i get this message:
You will need to place the CGI Scripts that you want to run with your userid in the directory...I didnt know how to put my userid.

That means place scripts in the scgi-bin directory and scripts placed there will run with your userid (rather than the webserver's userid). There's nothing there you need to set.

Access the cgi script again & check the error log (CPanel, Logs, Error Log) to see what's wrong.

SCGI wrapping is... problematic. If you don't need to access restricted resources (i.e. the webserver can access any needed files), put the scripts in cgi-bin.

Edit:
If your scripts aren't executing, try creating an .htaccess file in scgi-bin with the following contents:
Code:
Options +ExecCGI -Indexes
Action scgi-script /usr/local/cpanel/cgi-sys/scgiwrap
AddHandler scgi-script .cgi .scgi .pl .py .sh .rb

You can also use the cgi-script handler rather than the scgi wrapper but the scripts won't run as your account; you might as well put the cgi scripts in cgi-bin.

You may also need to create a directory index (index.{html,shtml,php}) file in scgi-bin. In my tests, I was getting a directory listing even with the Indexes option turned off.
 
Last edited:
Status
Not open for further replies.
Top