I have a Web API that is using .NET 4.0 which I'm now trying to deploy on Debian.I've followed a few tutorials on how to do this, e.g. Running ASP.net Web API Services under Linux and OSx.$ /etc/nginx/sites-available/default:server {    listen        80;    root          /var/www/API/;    index         index.html index.htm default.aspx Default.aspx index.cshtml Index.cshtml;    server_name   localhost;    location / {        fastcgi_index    Index.cshtml;        fastcgi_pass     127.0.0.1:9000;        include          /etc/nginx/fastcgi_params;    }}I added the following to /etc/nginx/fastcgi_params:fastcgi_param    PATH_INFO          ;fastcgi_param    SCRIPT_FILENAME    $document_root$fastcgi_script_name;Then I started nginx and the mono server:# /etc/init.d/nginx start# fastcgi-mono-server4 /applications=/localhost:/var/www/API/ /socket=tcp:127.0.0.1:9000 /verbose=TrueThen when I try to access the site the log gives warnings and errors that I've failed to find a solution for:Warning: Duplicate name, SCRIPT_FILENAME, encountered. Overwriting existing value.Error: No application defined for: localhost:80/Index.cshtml
Encountering issues when trying to host an ASP.NET Web Api on Debian using Mono and Nginx
debian;nginx;mono;asp.net
The warning is generated because you have two SCRIPT_FILENAME lines in your /etc/nginx/fastcgi_params file. The original value and the new value you added. You should comment out the old value to suppress the warning message.The error is generated because the syntax of your fastcgi-mono-server4 command invocation is wrong. The /applications element should probably be something like:/applications=localhost:/:/var/www/API/See this document for further details.