perl - Starman 和 MovableType 5.2

标签 perl amazon-ec2 movabletype psgi starman

MovableType 5.2 有内置的 PSGI 支持(通过主目录中的 mt.psgi),我一直在尝试使用 starman/plackup 来利用它。

Starman w/MT 启动了,但当我运行 mt-upgrade.cgi 时,我得到了奇怪的 Not Founds 和无声挂起并失败。

我如何运行starman:

cd /home/ec2-user/mysite/perl/components/movabletype
plackup -s Starman --port 8045 --error-log /home/ec2-user/mysite/perl/logs/starman.log --pid /home/ec2-user/mysite/perl/var/starman.pid -a mt.psgi

疑点 1:我的浏览器对 index.html 返回“未找到”,但 mt-static 和 mt.cgi 是可访问的。

X http://mysite:8045/mt/index.html ... Not Found 
✓ http://mysite:8045/mt-static ... listing of static assets 
✓ http://mysite:8045/mt/mt.cgi ... redirects to ... 
X http://mysite:8045/mt/mt-upgrade.cgi?__mode=install ... fails

谜团 2:由于重定向,我相信 MT 代码正在运行。但即使我尝试了不同的 MT 调试选项,starman 日志中也大多保持沉默。更糟糕的是,似乎到达了 mt-upgrade.cgi,然后又失败了,并在 starman 日志中显示了这条单独的消息:

[mypid] Bootstrap CGI script in non-buffering mode: /home/ec2-user/mysite/perl/components/movabletype/mt-upgrade.cgi

这条非缓冲消息看起来是信息性且正常的,并且来自 MT 代码库。

我也直接在starman下运行并得到相同的结果。

任何想法或帮助将不胜感激!

系统/环境:

MT_HOME='/home/ec2-user/mysite/perl/components/movabletype'

linux AMI on an amazon ec2.

perl-5.16.0 under perlbrew.

CPAN 模块:

cpanm starman
cpanm CGI::PSGI
cpanm CGI::Parse::PSGI
cpanm CGI::Compile
yum install expat-devel
cpanm XML::Parser
cpanm SOAP::Lite
cpanm SOAP::Transport::HTTP
cpanm XMLRPC::Transport::HTTP::Plack
cpanm DBI
sudo yum install postgresql9-devel
cpanm DBD::Pg
cpanm Task::Plack

MT 配置:

CGIPath    http://mysite:8045/mt

StaticWebPath    http://mysite:8045/mt-static

PIDFilePath /home/ec2-user/mysite/perl/var/starman.pid

DebugMode 1

ObjectDriver DBI::postgres
Database db
DBUser dbuser
DBPassword dbpass
DBHost dbhost.mysite

最佳答案

我是 Alpine 雄二,Movable Type 的首席工程师。我确实尝试重现您的步骤,但无法重现。 (这意味着我得到了初始安装屏幕)

那么,你能尝试一下mysql吗?您也可以尝试“工具/升级”脚本吗?我认为当发生某些错误时您可以收到错误消息。

例如) cd MT_HOME; perl -Ilib -Iextlib 工具/升级 --用户名 --密码 --昵称 --电子邮件 --首选语言 --site_name --site_url --site_path --site_theme --site_timezone

并且,我有关于“index.html 未找到”的答案。

原因:MT永远不会像mt_static一样将MT_HOME挂载为静态文件目录,因为我们认为MT_HOME一定无法列出。

关于perl - Starman 和 MovableType 5.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13691650/

相关文章:

php - 如何使用 perl/php/grep/etc 从 csv 中提取日期范围?

Perl 合并哈希

node.js - 使用 AWS 服务持续交付 NodeJS 应用程序

amazon-web-services - AWS Elastic Beanstalk 环境请求关联 "instance profile"

ssl - Movable Type Administration to https 子域

wordpress - Super Cache 与 MovableType 静态发布

perl - 打印 Perl 哈希键

perl - 检查通过 LWP 请求返回的 SSL 证书

amazon-web-services - 如何限制特定IAM角色对S3存储桶的访问?

perl - 使用 Mojo::DOM 处理 HTML 文档时,如何最可靠地保留 HTML 实体?