Research on the configuration and deployment of high performance Web server Nginx (1) nginx introduction and Getting Started example

Source: Internet
Author: User
Tags what is nginx

Overview

From this blog post, will lead the reader to appreciate the strong nginx.

What is Nginx used for? I believe that many friends have already used, if you do not, then you must know one of the following names: Apache,lighttpd,tomcat,jetty. They occupy almost all of the current Web server, where Apache is the most well-known and the most heavyweight. LIGHTTPD, Tomcat, and Jetty are relatively lightweight, where Jetty, Tomcat is used as a Java server container.

Nginx is a bsd-like protocol based, open source, high performance, lightweight HTTP server, reverse proxy server, and e-mail (SMTP, POP3, IMAP) servers. Nginx was developed by a Russian software engineer named "Igor Sysoev", originally used for the rambler.ru website (the site is ranked second in Russian domestic traffic).

Don't bother with these backgrounds, here are two very brief Nginx location examples. If you have not touched the Nginx configuration file before, so now you see these two examples may be some doubts, no relationship, this intuitive understanding of the first left in your mind, and then the article will take you step-by-step into the world of Nginx.

Instance implementation http://a.com/abcTo http://b.com/abc

Add a piece of code to the Submodule server of the HTTP module in Nginx's default configuration file:

location ^~ /hd{   rewrite  ^/hd/(.*)$  http://www.google.com/$1  permanent;}
Realize http://a.com/msg?url=www.b.comTo http://www.b.com
location ^~ /img_proxy{   set $img_proxy_url "";   set $suffix "";   if ($query_string ~ "url=(.*)")   {      set $img_proxy_url $1;      set $suffix "";   }   resolver 208.67.222.222;   proxy_pass http://$img_proxy_url/$suffix;   proxy_set_header referer "http://$img_proxy_url";}

The above two examples have many nginx configuration file syntax content, if temporarily do not understand, no relationship, don't worry, next you will soon learn.

Research on the configuration and deployment of high performance Web server Nginx (1) nginx introduction and Getting Started example

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.