3

I know I'm running mono-apache-server4 but when I launch the site mono-apache-server2 is responding.

Why is my site not using 4.0?

See htop:

enter image description here

This is what I did:

Installed Debian Wheezy along with apache and mod-mono:

apt-get install mono-apache-server2 mono-apache-server4 libapache2-mod-mono libmono-i18n2.0-cil

Then I edited the default virtual host file: sudo nano /etc/apache2/sites-available/default

<VirtualHost *:80>
  ServerName mydomain.org
  ServerAdmin myname@mydomain.com
  ServerAlias www.mydomain.org
  DocumentRoot /var/www/mydomain.org/
  ErrorLog /var/www/logs/mydomain.org.error.log
  CustomLog /var/www/logs/mydomain.org.access.log combined

  MonoServerPath example.com "/usr/bin/mod-mono-server4"

  MonoDebug mydomain.org true
  MonoSetEnv mydomain.org MONO_IOMAP=all
  MonoApplications mydomain.org "/:/var/www/mydomain.org/"
  <Location "/">
    Allow from all
    Order allow,deny
    MonoSetServerAlias mydomain.org
    SetHandler mono
    SetOutputFilter DEFLATE
    SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip dont-vary
  </Location>
  <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript
  </IfModule>
</VirtualHost>

And restarted apache2:

enter image description here

Update:

I reinstalled using:

apt-get install mono-apache-server4 libapache2-mod-mono libmono-i18n4.0-all

But Jim's answer was the culprit.

1
MonoServerPath example.com "/usr/bin/mod-mono-server4"

should probably be

MonoServerPath mydomain.org "/usr/bin/mod-mono-server4"
  • Good EYE! I also reinstalled using apt-get install mono-apache-server4 libapache2-mod-mono libmono-i18n4.0-all the way I had it, I only included 2.0 libraries. But ofcourse it still didn't work until I made your modification. – capdragon Oct 19 '12 at 18:34
  • @Jim Paris, I am running Ubuntu 16.04 alpha instead of debian wheezy. What mono packages do I need to install to make your fix work when serving ASP.NET content? June 17 2016. Thank you. – Frank Jun 17 '16 at 6:53

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.