Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
    
It depends on the distribution. It's usually somewhere such as /etc/httpd/conf or /etc/apache2. –  uther Apr 26 '12 at 18:48
    
Awesome! That's even better! –  capdragon Apr 26 '12 at 18:58

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).

share|improve this answer
    
Very good suggestion.(+1) –  capdragon Apr 26 '12 at 18:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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