1

I would like to know how to serve multiple ASP.NET applications on multiple mod-mono-server4 Linux process domains.

I am running Ubuntu 16.04 on a Lenovo ThinkStation desktop.

Here is how I plan to serve multiple ASP.NET applications on multiple mod-mono-server4 Linux process domains

Put the following directive at the bottom of apache2.conf

   Alias /test "/usr/share/doc/xsp/test"
   Alias /personal "/home/user/mypages"

   MonoApplications testing "/test:/usr/share/doc/xsp/test"
   <Location /test>
      MonoSetServerAlias testing
   </Location>

   MonoApplications personal "/personal:/home/user/mypages"
   <Location /personal>
      MonoSetServerAlias personal
   </Location>

With this approach. I am wondering how to start up multiple, n = 8 ,mod-mono-server4 Linux processes at Ubuntu 16.04 reboot time. Currently , I am using the apache2 prefork module with StartServers = 8 and I can only start a single mod-mono-server4 Linux process domain at reboot time using systemd with an apache.service file I wrote.

Any help is greatly appreciated. I can provide more specific information on how I configured apache2 and mod-mono-server4 if requested.

0

After reading this URL tonight, http://manpages.ubuntu.com/manpages/trusty/man8/mod_mono.8.html, my hypothesis is that we can use /etc/apache2/apache2.conf to configure any number of different mod-mono-server instances to start up at reboot time using the MonoSetServerAlias alias to set customize the run-time behavior of each individual mod-mono-server instance as shown below.

CONFIGURATION DIRECTIVES All the directives but MonoSetServerAlias accept an optional first argument that is the mod-mono-server instance alias for which the directive applies. If only one argument is provided for them, thr directive will apply to the 'default' mod-mono-server instance. Refer to the monodoc documentation on configuring mod_mono for more examples.

 MonoSetServerAlias
          Takes a server alias name. This is to be used inside <Directory>
          or <Location>.  Default value: 'default' if the directive is not
          used.

  I will test my hypothesis in 15 minutes and let everybody know my findings here. 

  Here is what I just tested.  It appears to work.

Alias /test "/var/www/firstaspnet"
Alias /personal "/var/www/secondaspnet"
AddMonoApplications testing "/test:/var/www/firstaspnet"
AddMonoApplications organicchem "/personal:/var/www/secondaspnet"
MonoListenPort 9000
<Location /test>
      SetHandler mono
      MonoSetServerAlias testing  
</Location>
<Location /personal>
     SetHandler mono
     MonoSetServerAlias organicchem
</Location>

I can be reached by email or cellphone about this unix-linux stack exchange topic or any other if you request with 24 hour advance notice.

  • This soluton has a limitation that the number of mod_mono_server4 processes started can exceed the number of apache2 server processes started at reboot time. – Frank Jun 26 '16 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.