• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

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