2

Is there any way to restart ONE web application in mono without having to restart Apache?

Currently I'm doing a sudo service apache2 restart everytime I deploy my .NET web application to mono, but it restarts all my other applications, requiring them ALL to get reloaded into memory at next web request.

2 Answers 2

3

Enable the mod_mono control panel.

In httpd.conf, add

<Location /mono>
  SetHandler mono-ctrl
  Order deny,allow
  Deny from all
  Allow from 127.0.0.1
</Location>

You will need to modify the addresses that can access it in the Allow from line.

Reload httpd and now you can go to http://some.website.domain/mono. You can, among other things, reload all or individual mono applications.

2
  • It depends on the distribution. It's usually somewhere such as /etc/httpd/conf or /etc/apache2.
    – George M
    Commented Apr 26, 2012 at 18:48
  • Awesome! That's even better!
    – capdragon
    Commented Apr 26, 2012 at 18:58
3

The easy way:

touch web.config

in the root of your web app (make sure web.config has the right casing).

You can also kill the mod_mono process for the web application you want to restart (ps auxfww and try to find the pid, then kill -9 pid).

1
  • Very good suggestion.(+1)
    – capdragon
    Commented Apr 26, 2012 at 18:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .