[英]Apache2 Returns 404 on Perl Script
[SOLVED] [解决了]
After managing to get the server to throw 500's I then had to relocate the line; 在设法使服务器抛出500的结果之后,我不得不重新定位了生产线。 to a different location within the .pl script.
到.pl脚本中的其他位置。
;-) ;-)
I have located this article VIA SO: Why does my Perl CGI program return a server error? 我已经通过SO找到了这篇文章: 为什么我的Perl CGI程序返回服务器错误?
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. 这是我目前在运行A2的Ubuntu 12.04.02上遇到的相同问题,但是在/ etc / apache2 / sites-available中进行的设置更改似乎正确无济于事。
=> 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; =>在Perl脚本脚本我有从功能是通过CLI浏览器中运行的问题(只是调用Perl解释器的下面);
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. =>此服务器目前在配置上非常基础,仅用于托管1个网站。 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?
此时,尚未分配任何域,我只是通过LAN IP 10.0.0.50访问它,我认为这应该不是问题吗?
=> My doc root is /var/www
=> The cg-bin is located: /var/www/cgi-bin
=>我的文档根目录是
/var/www
=> cg-bin位于: /var/www/cgi-bin
=> Presently /etc/apache2/sites-available/default is utilizing the following parameters with respect to ScriptAlias; =>目前,/ etc / apache2 / sites-available / default针对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; =>我已将以上内容设置为以下内容,但服务器仍返回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: => /var/log/apache2/error.log提供以下内容:
[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; => / etc / apache2 / sites-available / default **的顶部显示为;
<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 最好的祝福
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. 我相信您对script / dir文件夹具有u + x权限,并且该脚本位于ScriptAlias目录中,请再次检查此链接以查看是否缺少任何配置。 -
--
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.