0

I was having some issue with my server so I decided to fully un-install Mono and re-install it. Big error. It won't re-install and the server is broken until I fix it.

First, I un-installed everything mono-related.

Then, I followed these instructions to install on Ubuntu 16.04.1 http://www.mono-project.com/docs/getting-started/install/linux/

I confirm the file /etc/apt/sources.list.d/mono-xamarin.list contains

deb http://download.mono-project.com/repo/debian wheezy main
deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main

I then type "apt-get install mono-complete"

Then apache2 fails to reload. After digging, it becomes clear there is no trace of mod_mono. If I look in /etc/apache2/mods-available/, mod_mono isn't there.

Why is mod_mono failing to install, and how can I install it? Thanks!

As a side note, I also tried reinstalling the default Ubuntu version without the Xamarin repository, and it also failed to install mod_mono.

0

Thanks for the link SushiHangover.

This solved the problem:

apt-get install libapache2-mod-mono

Additionally, httpd.conf contained

#MonoAutoApplication enabled
RewriteMap lowercase int:tolower

<IfModule fcgid_module>
  <FilesMatch ".(aspx|axd|asmx|ashx|asax|ascx|soap|rem|axd|cs|config|Config|dll)$>
    SetHandler fcgid-script
    FCGIWrapper /usr/bin/fastcgi-mono-server4 .aspx
    FCGIWrapper /usr/bin/fastcgi-mono-server4 .asmx
    FCGIWrapper /usr/bin/fastcgi-mono-server4 .ashx
    FCGIWrapper /usr/bin/fastcgi-mono-server4 .asax
    FCGIWrapper /usr/bin/fastcgi-mono-server4 .ascx
    FCGIWrapper /usr/bin/fastcgi-mono-server4 .soap
    FCGIWrapper /usr/bin/fastcgi-mono-server4 .rem
    FCGIWrapper /usr/bin/fastcgi-mono-server4 .axd
    FCGIWrapper /usr/bin/fastcgi-mono-server4 .cs
    FCGIWrapper /usr/bin/fastcgi-mono-server4 .config
    FCGIWrapper /usr/bin/fastcgi-mono-server4 .Config
    FCGIWrapper /usr/bin/fastcgi-mono-server4 .dll
    Options +ExecCGI
 </FilesMatch>

 FcgidInitialEnv MONO_FCGI_APPCONFIGDIR /etc/mono-fastcgi
 FcgidMaxRequestLen 204800000
</IfModule>

It complained about being unable to find /usr/bin/fastcgi-mono-server4. Not sure why it was configured that way, but I commented the whole lower section and uncommented MonoAutoApplication and it's now working.

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.