4

I'm using mod-mono for deploying an asp.net mvc application on Ubuntu Server 10.04. The following packages were installed: mono-apache-server4 libapache2-mod-mono apache2.

There are several blogs that configure mod-mono virtual hosts via the sites-available Apache configuration. For example, I could modify /etc/apache2/sites-available/default configuration like this:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost

    MonoApplications "/:/var/www"
    MonoServerPath /usr/bin/mod-mono-server4

    ... more default configuration

But then there are also sites that advise to use an webapp file for mod-mono virtual host configuration. For example, I could modify /etc/mono-server4/debian.webapp like this:

<apps>
    <web-application>
        <name>default</name>
        <vpath>/</vpath>
        <path>/var/www/</path>
        <vhost>127.0.0.1</vhost>
    </web-application>
</apps>

Both approaches however need an apache site SetHandler mono configuration setting.

The only difference I noticed is that for sites configuration I have to explicitly define mod-mono-server4 (otherwise the system is trying to start a server2 instance which is not installed). When configured via sites configuration it also seems that there is an additional mono_server process spawned.

I guess I should go with the webapp option, but are there any "big" differences between this two approaches? Is webapp configuration distribution specific or why are there two options anyway?

tereško
  • 58,060
  • 25
  • 98
  • 150
Dresel
  • 2,375
  • 1
  • 28
  • 44

1 Answers1

1

Webapp config file approach can also be used with stand-alone XSP4, without the need of apache. For example, you can run:

xsp4 --appconfigfile etc/mono-server4/debian.webapp

And you'll get XSP4 working with your webapp config file.

wind39
  • 441
  • 4
  • 14
  • Should we use the ubiquitious mod-mono-server4 rather than xsp4 or fastcgi-mono-server? Thank you. – Frank Jun 24 '16 at 01:34