Mono Apache Server – Apache VirtualHost Using Mono-Apache-Server2 Instead of Mono-Apache-Server4

mono

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.

Best Answer

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

should probably be

MonoServerPath mydomain.org "/usr/bin/mod-mono-server4"
Related Question