Reputation: 872
I've got three different error messages in my apache error log every time I'm starting apache. I've read the mod_mono configuration section multiple times so please give me a hint how to get rid of theses messages. The applications (3 asp.net projects) are running fine though.
first:
Listening on: /tmp/mod_mono_server_global
Root directory: /
Error: Address already in use
second:
Error: There's already a server listening on /tmp/mod_mono_server_global
third:
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 config
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
Upvotes: 19
Views: 2236
Reputation: 1497
First: Listening on: /tmp/mod_mono_server_global Root directory: / Error: Address already in use
This sounds like it's not loaded using that formatting (it would then connect to /tmp/mod_mono_server_example_com
)
MonoApplications example.com "/:/srv/www/vhosts/example.com"
Could it be you have more of a problem of vhost description, nothing to do with mod_mono :-/
try that (if on different vhost name):
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>
Or that (if just in different folder on same 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>
I guess you had a look here http://www.mono-project.com/Mod_mono
Check you are using AddMonoApplications
not MonoApplications
Good luck
Upvotes: 1
Reputation: 1275
You may have conflicting Listen directives in your Apache configuration. If that doens't help, try to strace Apache and see which socket or file the error pops up on. I've written a tutorial on strace, you may want to check it out.
Upvotes: 0