• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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