Deploy ASP. NET using nginx + mono in Windows

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.