繁体   English   中英

apache和mod_mono调试

[英]apache and mod_mono debugging

我安装了apache2和mod_mono。 问题是,当我请求http://myvirtual.mynetwork/My.Services.WebsiteComms.test.aspx时 ,将下载文件,而不是像aspx处理程序所说的那样执行文件。

mod_mono已启用,一些有用的设置:

(已应用)/etc/rc.local:

if [ ! -e /proc/sys/fs/binfmt_misc/register ]; then
        /sbin/modprobe binfmt_misc
    mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
fi
if [ -e /proc/sys/fs/binfmt_misc/register ]; then
        echo ':CLR:M::MZ::/usr/bin/mono:' > /proc/sys/fs/binfmt_misc/register
else
        echo "No binfmt_misc support"
        exit 1
fi
exit 0

/ etc / debian_version:

7.1

/etc/mono-server4/mono-server4-hosts.conf:

<IfModule mod_mono.c>
  MonoUnixSocket default /tmp/.mod_mono_server4
  MonoServerPath default /usr/bin/mod-mono-server4
  AddType application/x-asp-net .aspx .ashx .asmx .ascx .asax .config .ascx
  MonoApplicationsConfigDir default /etc/mono-server4
  MonoPath default /usr/lib/mono/4.0:/usr/lib
</IfModule>

(此文件包含在/etc/apache2/mods-enabled/mono.conf中的apache2配置中)

/ usr / bin / mod-mono-server4正在运行,/ tmp / .mod_mono_server4对于www-data用户是套接字可写的。

我在/ srv / web有虚拟主机的documentroot,在docroot中有以下文件:

My.Services.WebsiteComms.test.aspx
My.Services.WebsiteComms.test.aspx.config
My.Services.WebsiteComms.test.exe
My.Services.WebsiteComms.test.exe.config
My.Services.WebsiteComms.test.pdb

.aspx只是exe文件的一个副本,如果我通过mono ./My.Services.WebsiteComms.test.exe运行它,则可以正常工作。aspx和exe文件的www-data(所有者)都带有+ x。

如果这是/etc/mono-server4/mono-server4-hosts.conf的全部内容,那么您没有设置任何应用程序。 您需要手动或使用mono-server4-adminmono-server4-update (推荐)添加一些。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM