I am trying to host an ASP.NET Web Forms application using Mono. I have installed Mono 3.0.7 and XSP 2.10.2 from source into the /usr/bin directory. I then started the mono server with the following command:
fastcgi-mono-server4 /applications=www.example.com:/:/var/www/example/ /socket=tcp:127.0.0.1:9000 /verbose=True /printlog=True
However, when I browse to http://www.example.com
, I get a 502 Bad Gateway error. I see that the following error was logged:
[2014-11-10 15:30:01Z] Error Failed to process connection. Reason: Could not load file or assembly 'fastcgi-mono-server4, Version=2.10.2.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
So why does it fail to find the file?
I tried adding /usr/bin
to my MONO_PATH
, but that did not help.
Here is my nginx configuration:
server {
listen 80;
server_name www.example.com 172.245.43.220;
access_log /var/log/nginx/example.access.log main;
root /var/www/example;
index Default.aspx;
location / {
try_files $uri $uri/ /Default.aspx;
fastcgi_index Default.aspx;
fastcgi_pass 127.0.0.1:9000;
include /etc/nginx/fastcgi_params;
fastcgi_param PATH_INFO "";
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}