Apache-2.4

在 AWS Linux AMI 上安裝 OTRS 導致 500 內部伺服器錯誤頁面

  • April 21, 2017

我正在 Amazon Linux AMI 2017.03.0 (HVM) 上創建一個新的 OTRS 實例,但無法執行 installer.pl。我的安裝步驟如下(到目前為止我已經完成了大約四次):

  • 設置主機名
  • 使用伺服器的 FQDN (172.10.10.10 otrs.example.com) 將私有 IP 地址添加到 hosts 文件
  • sudo yum -y update
  • sudo yum -y install bash-completion --enablerepo=epel
  • wget http://ftp.otrs.org/pub/otrs/RPMS/rhel/ ... noarch.rpm
  • sudo yum -y install --nogpgcheck otrs-5.0.18-01.noarch.rpm
  • sudo yum install -y mod24_perl "perl(JSON::XS)" "perl(GD::Text)" "perl(Encode::HanExtra)" "perl(GD::Graph)" "perl(Mail::IMAPClient)" "perl(PDF::API2)" "perl(Text::CSV_XS)" "perl(YAML::XS)" "perl(DBD::mysql)"
  • sudo /sbin/chkconfig httpd on
  • sudo reboot

SELinux 被禁用。重新啟動後,我可以訪問 Amazon Linux AMI 測試頁面,但不能訪問 otrs.example.com/otrs/installer.pl(導致 500 內部伺服器錯誤)。

我的 httpd_error 日誌顯示:

[Thu Apr 20 22:21:31.894716 2017] [core:notice] [pid 2721] AH00094: Command line: '/usr/sbin//opt/'
[Thu Apr 20 22:21:41.067143 2017] [:error] [pid 2725] Cannot find current script '/opt/' at /usr/share/perl5/FindBin.pm line 166.\nBEGIN failed--compilation aborted at /usr/share/perl5/FindBin.pm line 166.\nCompilation failed in require at /opt/otrs/bin/cgi-bin/installer.pl line 25.\nBEGIN failed--compilation aborted at /opt/otrs/bin/cgi-bin/installer.pl line 25.\n
[Thu Apr 20 22:21:48.280174 2017] [:error] [pid 2726] Cannot find current script '/opt/' at /usr/share/perl5/FindBin.pm line 166.\nBEGIN failed--compilation aborted at /usr/share/perl5/FindBin.pm line 166.\nCompilation failed in require at /opt/otrs/bin/cgi-bin/installer.pl line 25.\nBEGIN failed--compilation aborted at /opt/otrs/bin/cgi-bin/installer.pl line 25.\n
[Thu Apr 20 22:58:25.283392 2017] [autoindex:error] [pid 2724] [client 64.62.178.49:52639] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive

我沒有弄清楚到底出了什麼問題,但它涉及到指定mod24_perl. 此安裝適用於 Amazon Linux:

  • sudo yum -y install --nogpgcheck otrs-5.0.18-01.noarch.rpm
  • sudo yum install -y "perl(Crypt::Eksblowfish::Bcrypt)" "perl(JSON::XS)" "perl(GD::Text)" "perl(Encode::HanExtra)" "perl(GD::Graph)" "perl(Mail::IMAPClient)" "perl(PDF::API2)" "perl(Text::CSV_XS)" "perl(YAML::XS)" "perl(DBD::mysql)"

我以為我一開始就嘗試過這樣的安裝,但當時肯定配置錯誤。

引用自:https://serverfault.com/questions/845825