Since mono 1.9, ASP. NET can also be used in FastCGI through mono fastcgi-mono-server2
Mono is compatible with windows. We can deploy mono on Lighttpd, nginx, Apache, and other servers in windows.
ASP. NET.
I extracted the FastCGI-mono-server from mono for windows. You can click here to download it.
Nginx currently supports windows, which is a very good choice for deploying web servers. You can download it on the official nginx website.
Below is my nginxNginx. confBlue text is the key content.
|
Worker_processes 1;
Error_log logs/error-debug.log Info;
Events
{
Worker_connections 1024;
}
HTTP {
Include
Mime. types;
Default_type text/plain;
Sendfile
On;
Keepalive_timeout 65;
Index index.html
Index.htm;
Server {
Listen
80;
SERVER_NAME yourdomain.com;
Index. aspx
Default. aspx;
Location /{
Root
D: \ www/yourwebapp;
Fastcgi_pass
127.0.0.1: 8000;
Fastcgi_param script_filename
$ Document_root/$ fastcgi_script_name;
Include
Fastcgi_params;
}
}
}
|
Then extract the above FastCGI-mono-server and register all the files to GAC (otherwise the web application will not find them, of course, you can also directly put them in
Webapp/bin), And decompress the package to a folder, which is assumed to be D:/FastCGI-mono-server.
Then run FastCGI with the following command:
Fastcgi-mono-server2/socket = TCP: 127.0.0.1: 8000
/Root = "D: \ www \ yourwebapp"/applications = yourdomain.com :/:.
/Multiplex = true |
Finally, run the nginx server. Our ASP. NETProgramYou can run it out of the bloated IIS guy !!!
Zealic 04/01/2010