Original link: http://www.cnblogs.com/amityat/archive/2011/08/23/2150153.html
1, what is Nginx
Brief introduction
Nginx ("Engine X") is a high-performance HTTP and reverse proxy server, also a IMAP/POP3/SMTP proxy server. Nginx was developed by Igor Sysoev, the second-most visited rambler.ru site in Russia, which has already run more than 2.5 of the site. Igor release the source code in the form of a BSD-like license. Although still beta, Nginx has been known for its stability, rich feature set, sample configuration files, and low system resource consumption. Please see the official wiki:http://wiki.codemongers.com/nginxchs for more information.
The advantages of Nginx
Nginx as an HTTP server, has the following basic features:
- Processing static files, index files and automatic indexing;
Reverse proxy acceleration (no caching), simple load balancing and fault tolerance;
FastCGI, simple load balancing and fault tolerance;
Modular structure. Filters include gzipping, byte ranges, chunked responses, and Ssi-filter. In the SSI filter, multiple sub-requests to the same proxy or FastCGI are processed concurrently;
SSL and TLS SNI support;
It's simple. Let's go to Google.
2, what is fastcgi
Brief introduction:
FastCGI, like CGI, is a standard for Web servers and external program interfaces, a technique developed to address CGI performance issues.
FASTCGI has improved CGI technology, a fastcgi process that is created when the Web server starts or when the client first requests it, does not terminate after processing the client request, but waits for the next request to be processed. In addition, the FASTCGI program interacts with the CGI program and the server, and the CGI program interacts with the environment variables, the command line, and the standard input output, so the CGI program process must be on the same physical computer as the server process, and the FASTCGI program interacts with the server process over the network connection. Therefore, the FASTCGI program can be distributed on different computers, which not only improves performance, but also improves the system's ability to expand.
3, what is mono
Mono is a collective, spontaneous development project designed to develop an open source, Linux version of the Microsfot.net development platform. As an organic. NET overall, it includes a C # compiler, a common language runtime environment, and a related set of class libraries. The mono project will enable developers to develop. NET applications that can run on the Windows platform as well as on any mono-enabled platform, including Linux, Unix. The Mono project will enable you to develop a wide range of cross-platform applications and greatly improve the development efficiency of the open source field.
Here only to do a brief introduction, specific to Google it.
The above are all from the network.
Enter the theme ...
Deploying nginx+mono+fastcgi under Windows Deployment ASP.
Download nginx: To download the corresponding version of Nginx
Download Mono Platform: Download mono.
1, create an ASP. It's called Nginxsite.
2, I downloaded the nginx-0.8.54. nginx-0.9.4 can't run on my win7.
After unpacking, open the nginx.conf file under the Conf folder.
Configure the main nodes to:
HTTP {
Include Mime.types;
Default_type Application/octet-stream;
#log_format Main ' $remote _addr-$remote _user [$time _local] "$request" '
# ' $status $body _bytes_sent ' $http _referer '
# ' "$http _user_agent" "$http _x_forwarded_for" ';
#access_log Logs/access.log Main;
Sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
Keepalive_timeout 65;
#gzip on;
server {
Listen 80;
server_name localhost;
#charset Koi8-r;
#access_log Logs/host.access.log Main;
Location /{
Root Nginxsite;
#index index.html index.htm;
Fastcgi_pass 127.0.0.1:8000;
Fastcgi_param script_filename $document _root/$fastcgi _script_name;
Include Fastcgi_params;
}
Error_page 502 503 504/50x.html;
Location =/50x.html {
root HTML;
}
Location ~. *\.aspx$ {
Root Nginxsite;
Fastcgi_pass 127.0.0.1:8000;
#fastcgi_index Default.aspx;
Fastcgi_param script_filename $document _root/$fastcgi _script_name;
Include Fastcgi_params;
}
# Static Resources
Location ~ ^/css/{
Root C:\nginx\Mono_MVC3;
Expires 4d;
}
#设定查看Nginx状态的地址
Location/nginxstatus {
Stub_status on;
Access_log on;
Auth_basic "Nginxstatus";
Auth_basic_user_file conf/htpasswd;
}
}
3, after configuration, enter D:\Program under command line files\mono-2.10\bin>
Enter fastcgi-mono-server4/socket=tcp:127.0.0.1:8000/root= "C:\nginx\nginxSite"/applications=/:. /multiplex=true/port=8080
C:\nginx\nginxSite is the root directory of Nginx under the website.
Start the service:
4, in the Nginx double-click Nginx.exe can start the service in the background.
5, in the browser input http://127.0.0.1 can browse the website
"Go" under Windows nginx+mono+fastcgi deploy ASP.