gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 13:02:11 24 4
gpt4 key购买 nike

每次启动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


虚拟主机配置

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" 


可能是您有更多关于虚拟主机描述的问题,与mod_mono无关:-/

试试看(如果使用不同的虚拟主机名):

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>


或那样(如果只是在同一虚拟主机上的不同文件夹中)

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

祝好运

关于asp.net - Mono vhost配置错误:地址已在使用中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9391866/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com