![]() |
Run CGI Script from cgi-bin 500 error - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Support Area (/forum-30.html) +--- Forum: Usage (/forum-34.html) +--- Thread: Run CGI Script from cgi-bin 500 error (/thread-6783.html) Pages: 1 2 |
RE: Run CGI Script from cgi-bin 500 error - kilburn - 12-18-2009 08:23 AM .htaccess is checked for existance in all folders that doesn't have "AllowOverride None" set. The "cgi-bin" folder itself should be owned by vuXXX:vuXXX and have 0755 permissions. Coincidentally, I've got a report from one of my users about the same issue. At the end, it turned out that he was using "#!/usr/local/bin/perl" as shebang, which doesn't exist on my server. The front-error was "500 internal server error", and there was an entry in "/var/log/apache2/suexec.log" stating "(2)No such file or directory: exec failed (script.cgi)". Replacing the shebang by the correct "#!/usr/bin/perl" solved the issue... RE: Run CGI Script from cgi-bin 500 error - Nuxwin - 12-18-2009 09:28 AM Hello ; What you use as language for your cgi script ; Examples (work fine for me): First, my test config: ispCP omega 1.0.3 on OpenSUSE. Code: ispcp:/srv/www/virtual/xn--bcher-kva.net/cgi-bin # ls -la First: shell script This script contain the following content: Code: ispcp:/srv/www/virtual/xn--bcher-kva.net/cgi-bin # cat test-cgi The result in my browser is: Code: Hello World Second: perl script: This script contain the following content: Code: ispcp:/srv/www/virtual/xn--bcher-kva.net/cgi-bin # cat tests-cgi The result in my browser is: Code: Hello World! BUT : If I change the content of the last script as this: Code: ispcp:/srv/www/virtual/xn--bcher-kva.net/cgi-bin # cat tests-cgi The result in my browser is: Code: Internal Server Error Why ? It's just an header issue. ![]() Note : If you want not use the perl CGI package, you can do as this instead ; Code: #!/usr/bin/perl Note: The header should be always followed by an empty line. Cheers ; RE: Run CGI Script from cgi-bin 500 error - motokochan - 12-18-2009 09:58 AM (12-18-2009 06:57 AM)cmendes0101 Wrote: What permission should the actual cgi-bin folder have? I set it to 0750 It should be 755 minimum to allow Apache to traverse it. The default ownership is for both user and group to be the vu entry for that site. Giving world no permissions also blocks Apache. (12-18-2009 06:57 AM)cmendes0101 Wrote: [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 That's related to the permissions you set. Apache can't look into the directory for an htaccess file, so it gives that error. |