2

[SOLVED]

After managing to get the server to throw 500's I then had to relocate the line; to a different location within the .pl script.

;-)

I have located this article VIA SO: Why does my Perl CGI program return a server error?

This is the same issue I am presently experiencing with Ubuntu 12.04.02 running A2, yet making the settings changes within /etc/apache2/sites-available which appear correct are making no positive influence.

=> Within the perl script (just beneath the call to perl interpreter) script I am having issue running from the browser which is functional VIA CLI;

 print "Content-type: text/plain\n\n";
 print STDERR "OK so far\n";
 print "Succeeded.";

=> This server is very basic at this point in configuration, and is only intended to host 1 web-site. At this point no domain has been assigned and I am just accessing it VIA LAN IP 10.0.0.50, which should not be an issue, I think?

=> My doc root is /var/www => The cg-bin is located: /var/www/cgi-bin

=> Presently /etc/apache2/sites-available/default is utilizing the following parameters with respect to ScriptAlias;

   ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
            AllowOverride None
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
    </Directory>

=> I have set the above to the following but still the server returns 404;

ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory "/var/www/cgi-bin/">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
</Directory>

=> /var/log/apache2/error.log provides the following:

[Thu Apr 18 23:06:22 2013] [error] [client 10.0.0.10] script not found or unable to stat: /usr/lib/cgi-bin/acctmanager.pl
[Thu Apr 18 23:07:45 2013] [notice] caught SIGTERM, shutting down
[Thu Apr 18 23:07:46 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.6 with Suhosin-Patch configured -- resuming normal operations

=> The top of** /etc/apache2/sites-available/default **appears as;

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www
        <Directory /var/www>
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory

If anyone has some idea of my error(s) I would be greatly appreciative for your time and input.

Thank you

Best Regards

Community
  • 1
  • 1
PC Networks
  • 25
  • 1
  • 4
  • I have now made changes in /etc/apache2/sites-available/default which now makes the server return 500's. /var/log/apache2/error.log: [Fri Apr 19 10:56:32 2013] [error] [client 10.0.0.10] (2)No such file or directory: exec of '/var/www/cgi-bin/acctmanager.pl' failed [Fri Apr 19 10:56:32 2013] [error] [client 10.0.0.10] Premature end of script headers: acctmanager.pl – PC Networks Apr 19 '13 at 18:00
  • 1
    At Stack Overflow, you don't add SOLVED to the title of your question. Instead, you select the checkmark below the score of the answer that you feel best solved your problem. – cjm Apr 19 '13 at 20:07
  • I am sorry for my error in placing SOLVED within the TITLE – PC Networks Apr 20 '13 at 20:22
  • BTW: I received no replies, I fixed the issue myself. So your REQUIREMENT to : Instead, you select the checkmark below the score of the answer that you feel best solved your problem – PC Networks Apr 20 '13 at 22:41
  • 1
    Then you should write up your solution as an answer and mark that as accepted, so the next person with your problem can benefit from it. – cjm Apr 21 '13 at 06:28

1 Answers1

0

I believe you have u+x permission on the script/dir folders and the script resides in the ScriptAlias Directory, Check this link again to see if you have missed any config. -