【问题标题】:Perl CGI script displayed as plain text [closed]Perl CGI 脚本显示为纯文本 [关闭]
【发布时间】:2016-03-17 11:05:44
【问题描述】:

我将所有网站移到另一台服务器上,一切正常,但是我的 perl 脚本没有运行,显示为纯文本。

必须在此 URL 上运行 perl 脚本。

该网站的虚拟主机如下:

<virtualhost *:80>
 ServerName prestoprint.ca
 ServerAlias  www.prestoprint.ca
 ServerAdmin zadmin@localhost
 DocumentRoot "/path/prestoprint_ca"
 ErrorLog "/path/prestoprint_ca/error/error.log"

 ScriptAlias /cgi-bin/ /path/prestoprint_ca/cgi-bin/

 <Directory "/path/prestoprint_ca">
     Options +FollowSymLinks +Indexes
     AllowOverride All
     Require all granted
     AddHandler cgi-script .cgi .pl
 </Directory>

 <Directory "/path/prestoprint_ca/cgi-bin">
     Options +ExecCGI
     SetHandler cgi-script
 </Directory>
 AddType application/x-httpd-php .php3 .php
 DirectoryIndex index.html index.htm index.php index.asp index.aspx index.jsp index.jspa index.shtml index.shtm filechucker.cgi
</virtualhost>

真的需要帮助:(

非常感谢!

【问题讨论】:

    标签: apache perl centos cgi


    【解决方案1】:

    URL 打印的消息是: 您必须安装 Digest::SHA1 Perl 模块,或者将以下内容添加到您的 prefs 文件中:

    $PREF{use_md5_for_hashes} = '是';

    所以你必须通过 CPAN 或发行版的 repo 安装 Digest::SHA1 模块。

    【讨论】:

    • 如何在 centos 上安装 Digest::SHA1?
    • 以 root 身份尝试 ... yum install perl-Digest-SHA1 ... 假设您使用的是 System perl。
    猜你喜欢
    • 2014-09-18
    • 2013-01-25
    • 2018-10-15
    • 2022-10-05
    • 1970-01-01
    • 2013-12-31
    • 2013-05-31
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多