asp.net – Mono vhost配置错误:地址已经在使用

前端之家收集整理的这篇文章主要介绍了asp.net – Mono vhost配置错误:地址已经在使用前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
每次启动apache时,我的apache错误日志中有三个不同的错误信息。我已经阅读了mod_mono配置部分多次,所以请给我一个提示如何摆脱这些消息。
应用程序(3个asp.net项目)运行正常。

第一:

Listening on: /tmp/mod_mono_server_global
Root directory: /
Error: Address already in use

第二:

Error: There's already a server listening on /tmp/mod_mono_server_global

第三:

Listening on: /tmp/mod_mono_server_example.com
Root directory: /srv/www/vhosts/example.com
Error: There's already a server listening on /tmp/mod_mono_server_example.com

vhost配置

MonoServerPath example.com "/usr/bin/mod-mono-server4"
MonoDebug example.com false
MonoSetEnv example.com MONO_IOMAP=all

MonoApplications example.com "/:/srv/www/vhosts/example.com"

 <Directory "/srv/www/vhosts/example.com">
     MonoSetServerAlias example.com
     SetHandler mono
 </Directory>

OpenSuse 11.4,Mono 2.10.2

解决方法

第一:
聆听:/ tmp / mod_mono_server_global
根目录: /
错误:地址已在使用中

这听起来像没有使用该格式加载(它将连接到/ tmp / mod_mono_server_example_com)

MonoApplications example.com "/:/srv/www/vhosts/example.com"

可能是你有更多的vh​​ost描述的问题,与mod_mono无关: – /

尝试(如果使用不同的vhost名称):

MonoAutoApplication disabled
AddHandler mono .aspx .ascx .asax .ashx .config .cs .asmx .axd

<VirtualHost *:80>
    ServerName example1.com
    ServerAlias www.example1.com
    DocumentRoot /srv/www/vhosts/example1.com

    MonoServerPath app1 "/usr/bin/mod-mono-server4"
    MonoDebug app1 false
    MonoSetEnv app1 MONO_IOMAP=all
    AddMonoApplications app1 "/:/srv/www/vhosts/example1.com"

    <Location />
        SetHandler mono
        MonoSetServerAlias app1
    </Location>
</VirtualHost>
<VirtualHost *:80>
    ServerName example2.com
    ServerAlias www.example2.com
    DocumentRoot /srv/www/vhosts/example2.com

    MonoServerPath app2 "/usr/bin/mod-mono-server4"
    MonoDebug app2 false
    MonoSetEnv app2 MONO_IOMAP=all
    AddMonoApplications app2 "/:/srv/www/vhosts/example2.com"

    <Location />
        SetHandler mono
        MonoSetServerAlias app2
    </Location>
</VirtualHost>

或者(如果只是在同一个vhost的不同的文件夹)

MonoAutoApplication disabled
AddHandler mono .aspx .ascx .asax .ashx .config .cs .asmx .axd

MonoServerPath app1 "/usr/bin/mod-mono-server4"
MonoDebug app1 false
MonoSetEnv app1 MONO_IOMAP=all
AddMonoApplications app1 "/app1:/srv/www/vhosts/example.com/app1"

MonoServerPath app2 "/usr/bin/mod-mono-server4"
MonoDebug app2 false
MonoSetEnv app2 MONO_IOMAP=all
AddMonoApplications app2 "/app2:/srv/www/vhosts/example.com/app2"

<VirtualHost *:80>
    ServerName example.com
    ServerAlias www.example.com
    ServerAlias 192.168.0.1
    # note that it this is the conf of first vhost read by apache,# it will be used as default,any call not having a matching
    # vhost will fall into that vhost.
    <Location /app1>
        SetHandler mono
        MonoSetServerAlias app1
    </Location>
    <Location /app2>
        SetHandler mono
        MonoSetServerAlias app2
    </Location>
</VirtualHost>

我想你看看这里http://www.mono-project.com/Mod_mono
检查你正在使用AddMonoApplications而不是MonoApplications

祝你好运

原文链接:https://www.f2er.com/aspnet/252779.html

猜你在找的asp.Net相关文章