![](/img/trans.png)
[英]Using Integrated Windows Authentication in a Perl Dancer App
[英]Can not run app using fcgi of perl Dancer
我正在测试使用fcgi部署Dancer的测试器示例。 但这只是没有用。 我不断收到错误消息:
File does not exist: /home/tester/MyApp/public/dispatch.fcgi/
但是,此应用程序可以与cgi成功运行。 而且我已经根据舞者的部署手册对http.conf进行了更改。
有人可以为我指出一些解决方案或此错误的可能原因吗?
以下是http.conf:
<VirtualHost *:80>
ServerName localhost
# /srv/www.example.com is the root of your
# dancer application
DocumentRoot /home/tester/MyApp/public
ServerAdmin you@example.com
<Directory "/home/tester/MyApp/public">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
AddHandler fastcgi-script .fcgi
</Directory>
ScriptAlias / /home/tester/MyApp/public/dispatch.fcgi/
ErrorLog /var/log/apache2/MyApp-error.log
CustomLog /var/log/apache2/MyApp-access_log common
</VirtualHost>
谢谢
我不认为ScriptAlias是您要使用的。 从文档中...
ScriptAlias指令与Alias指令具有相同的行为,不同之处在于,它还将目标目录标记为包含将由mod_cgi的cgi-script处理程序处理的CGI脚本。
基本上,Apache查找一个名为“ /home/tester/MyApp/public/dispatch.fcgi/”的目录,该目录中的每个文件都通过mod_cgi处理。 在这种情况下,由于它是常规文件而无法找到。
您是否尝试过使用mod_rewrite ? 我的Dancer的httpd配置与您的基本相同,只不过我使用的是mod_rewrite
DocumentRoot /home/user/src/MyApp/public
<Directory "/home/user/src/MyApp/public">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
AddHandler fcgid-script .fcgi #using fcgid instead of fastcgi
</Directory>
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /dispatch.fcgi$1 [QSA,L]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.