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

Research on the configuration and deployment of high-performance WEB server nginx (1) nginx introduction and getting started example
  • Author: poechant
  • Blog: blog.csdn.net/poechant
  • Email: zhongchao. USTC # gmail.com (#-> @)
  • Date: August 29Th, 2011
  • Update: February 26Th>, 2012.
Overview

Starting from this blog, we will show readers the strength of nginx.

What is nginx used? I believe many of my friends have already used it. If you do not have one, you must know one of the following names: Apache, Lighttpd, tomcat, and jetty. They occupy almost all of the current Web servers, of which Apache is the most well-known and heavyweight. Lighttpd, tomcat, and jetty are relatively lightweight. jetty and tomcat are mostly used as Java Server containers.

Nginx is a BSD-like protocol, open-source, high-performance, lightweight HTTP server, reverse proxy server, and email (SMTP, POP3, IMAP) server. Nginx was developed by a software engineer named "Igor Sysoev" in Russia and was originally used for rambler.ru websites (the site ranks second in traffic in Russia ).

The following describes two very brief nginx location examples. If you have never touched the nginx configuration file before, you may have some questions about the two examples. It doesn't matter. This intuitive understanding stays in your mind first, later articles will show you step by step into the nginx world.

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

Add a piece of code to the sub-module server of the HTTP module in the default nginx configuration file:

location ^~ /hd{   rewrite  ^/hd/(.*)$  http://www.google.com/$1  permanent;}
Implementation 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 a lot of syntax content for the nginx configuration file. If you do not understand it for the moment, it doesn't matter. Don't worry. You will learn it soon.

-

For more nginx technical blog posts, visit the csdn column nginx High-Performance Web Server

For more information, see "LIU Da's csdn blog": blog.csdn.net/poechant

-

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.