Search code examples
ubuntu-14.04mod-mono

Ubuntu 14.04 mod_mono error 503


I can't seem to get an asp site to run with ISPCONFIG3 at all. I am getting errors in the apache error.log like this:

Not running mod-mono-server.exe because no MonoApplications, MonoApplicationsConfigFile or MonoApplicationConfigDir specified. 

Failed to connect to mod-mono-server after several attempts to spawn the process.

I think it has to do with my configuration somehow but I can't seem to figure out where. Thoughts?


Solution

  • Encountered this error today after installing apache2, mod-mono, etc in Ubuntu 19.04 on my laptop. Having just done it successfully on an AWS instance running Ubuntu 18.04, I was surprised that it didn't work here. By trial and error tweaking the mono-server config, apache2 config, the ASP.NET web app folder (with a simple index.aspx in it), and looking at the apache2 error logs after each change (after stopping/restarting apache2 each time!), I discovered that, in my case at least, this error was caused by the absence of a web.config file in the web app root folder; as soon as I created a simple skeleton web.config file, this error message went away.

    Worth noting in passing is that the error message contains a typo: there should be an "s" for "Applications" in the keyword MonoApplicationConfigDir, like the other two keywords have. One of the things I tried was to alter the MonoApplicationsConfigDir statement that was present by default in my mono-server4-hosts.conf file by removing the "s" to match the error message, but that generated a different, fatal error that prevented apache2 from starting: systemctl status apache2.service showed "Invalid command 'MonoApplicationConfigDir'".