• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

CGI scripts not working

Nicolas

New Pleskian
Hi there,

I have search almost every CGI thread on this forum, and none of them solved my script issue. I can't run CGI scripts.

Help needed...please.

What I have done:

Create a "hello world" cgi script and place it under the "cgi-bin" directory:

Code:
#!/usr/bin/perl
# hello.pl -- my first perl script!

print "Content-type: text/html\n\n";
print "Hello, world!\n";

When I run at "www.peta.cl/cgi-bin/hello.cgi" it shows "500 Internal Server Error"

Errors shows:

Code:
2017-04-10 22:19:19 Error 190.162.219.35 500 GET /cgi-bin/hello.cgi HTTP/1.0  1.56 K Apache access
2017-04-10 22:19:19 Error 190.162.219.35 AH01215: failed to open log file /var/log/apache2/suexec.log Apache error
2017-04-10 22:19:19 Error 190.162.219.35 AH01215: fopen: Permission denied Apache error
2017-04-10 22:19:19 Error 190.162.219.35 End of script output before headers: hello.cgi

File /var/log/apache2/suexec.log shows:

Code:
[2017-04-10 22:19:00]: uid: (10001/nmella2) gid: (1004/1004) cmd: hello.cgi
[2017-04-10 22:19:12]: uid: (10000/ofimarket) gid: (1004/1004) cmd: cgi_wrapper
[2017-04-10 22:19:19]: uid: (10001/nmella2) gid: (1004/1004) cmd: hello.cgi

I have enable/disable CGI & Perl support at the domain hosting settings.

File is own by user : psacln and have permissions 755 (same permissions for cgi-bin folder).

Don't know what else to try. Appreciate your help !

Thanks !
 
Code:
#!/usr/bin/perl
# hello.pl -- my first perl script!

print "Content-type: text/html\n\n";
print "Hello, world!\n";

When I run at "www.peta.cl/cgi-bin/hello.cgi" it shows "500 Internal Server Error"

File is own by user : psacln and have permissions 755 (same permissions for cgi-bin folder).

Don't know what else to try. Appreciate your help !

Thanks !

You might look in your /var/log/messages and see if possibly SELinux is preventing something from functioning. There should be a clue in there.
 
Back
Top