.net - 单声道 3 - 403 错误

标签 .net linux mono fastcgi centos5

我正在通过 fastcgi 运行 mono 3.0...

我的 htaccess 是这样的:

Action mono-cgi /home/vamola/public_html/cgi-bin/mono-cgi
AddHandler mono-cgi .aspx .asmx .ashx .ascx .asax .axd .config .cs

单CGI:

#!/opt/mono-3.0.2/bin/fastcgi-mono-server4 -f
-connect /tmp/mono-fcgi.sock /home/admin/mono-fcgi

单声道 fcgi:

!/

bin/sh
umask 0077
exec >>/tmp/mono-fcgi.log
exec 2>>/tmp/mono-fcgi.err
 
echo $(date +"[%F %T]") Starting fastcgi-mono-server2
 
cd /
chmod 0700 /tmp/mono-fcgi.sock
echo $$>/tmp/mono-fcgi.pid
# stdin is the socket handle
exec env -i \
PATH="/opt/mono-3.0.2/bin:$PATH" \
LD_LIBRARY_PATH="/opt/mono-3.0.2/lib:$LD_LIBRARY_PATH" \
TMP="/home/username/tmp" \
MONO_SHARED_DIR="/tmp" \
/opt/mono-3.0.2/bin/fastcgi-mono-server2 \
/root=/home/vamola/public_html /applications=/:/home/vamola/public_html

我收到这个问题 404 not found server error...而且没有日志,什么都没有... 我做错了什么?

我按照这些步骤 http://www.mono-project.com/CGI 一个接一个……

另一个问题是,有什么方法可以测试我的“/opt/mono-3.0.2/bin/fastcgi-mono-server4”是否正常工作?

看看请:http://www.vamola.net/net/test.aspx

[编辑] 无论如何强制创建日志?因为我在 Apache 日志中什么也看不到... 即使这样:

  ErrorLog  /etc/httpd/logs/mono-error.log
  CustomLog /etc/httpd/logs/mono-access.log combined

谢谢,祝好!

最佳答案

您能否尝试将 virtual 关键字添加到您的 apache“Action”指令中?

    Action mono-cgi /home/vamola/public_html/cgi-bin/mono-cgi virtual

它将阻止 apache 检查文件是否存在于错误的目录中。

关于.net - 单声道 3 - 403 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15212754/

相关文章:

c# - 如何在 DLL 而不是 exe 上使用 app.config

c# - 正则表达式在非捕获组中包含字符?

linux - 提示 : No function matches the given name and argument types. `json_build_object`

c# - 在 Mono 中许可您的代码

linux - Mono 3.0.1 --> 为 Ubuntu 14.04 LTS (AWS Linux AMI) 编译 xsp 时出错

.net - TimeZoneInfo.ConvertTime 不转换任何东西

c# - 如何显示两个日期之间的计算值,仅小时和分钟超过 C# 中的 24 小时差异

linux - 用于合并行的 bash 脚本

ruby - 在开发环境中登录前自动运行 rails app

c# - 泛型方法继承 : VS and Xamarin Studio yield different results; which is right?