A very detailed comprehensive description of nginx

WBOY
Release: 2016-08-08 09:29:46
Original
1240 people have browsed it

http://www.ttlsa.com/nginx/

HTTP caching mechanism:

1. The content caching capability declared by the origin server. Mainly for http header information [...]

Read the full text

Category: NginxTags: nginx, web cache

Nginx SSL reverse proxy

January 25, 2015Mobei

Nginx reverse proxy is used in many scenarios. Nginx reverse proxy configuration can be found in this blog. So, how to configure the SSL reverse proxy of nginx? Please search the site for SSL configuration, so I won’t go into details here.

Modify nginx.conf configuration

server {

listen      443 ssl;[...]
Read the full text

Category:

NginxTags: nginx, ssl, Reverse proxy

Nginx blocks user agent

January 13, 2015

Mobei

Sometimes, it is necessary to prevent certain user agents from accessing the website, such as ab, wget, curl, etc., This requires the use of the $http_user_agent variable.

Modify nginx.conf

if
($http_user_agent ~* (Wget|ab) ) {

return403 ;

}

if
($http_u[…]
Read the full text

Category:

NginxTags: nginx

nginx from entry to master pdf download (TT Produced by LSA)

January 2015 9th

Administrator

Introduction to "nginx from entry to mastering PDF"

Produced website: Operation and maintenance survival time

TTLSA Author: Mobei, Liang Baikai

Compiler: Donan (QQ: 305765814)

Product website: www.ttlsa.com

Official Weibo: www.weibo.com/ttlsa/

Official QQ group: 39514058, 6690[…]

Read the full text

Category:

Nginx Tags: nginx, nginx.pdf, nginx tutorial, nginx e-book

nginx custom header return information module ngx_headers_more

November 29, 2014

Mobei

1. Introduction to ngx_headers_more

ngx_headers_more is used to add, set and clear input and output header information. The nginx source code does not include this module and needs to be added separately.

This module is an enhanced version of the ngx_http_headers_module module, providing more practical tools, such as resetting or clearing built-in header information, such as Conte[...]

Read full text

Category:

Nginx Tags: add_header, header, headers, nginx, ngx_headers_more

nginx configuration ssl two-way verification nginx https ssl certificate configuration

November 20, 2014

Liangbaikai

1. Install nginx

Reference inx installation》: http:// www.ttlsa.com/nginx/nginx-install-on-linux/

If you want to configure multiple https on a single IP/server, please see "nginx Configuring Multiple HTTPS Hosts on the Same IP"

2. Using openssl to implement certificate center […]

Read the full text

Category:

NginxTags: Linux, nginx, nginx ssl, ssl

nginx log cutting

November 10, 2014

Liangbaikai

#!/bin/bash

# This script run at 00:00

# The Nginx logs path

logs_path="/usr/local /nginx/logs"

Read the full text

Category: NginxTags: Linux, nginx, nginx log

Nginx grayscale release based on cookies

November 8, 2014Liangbaikai

Grayscale release refers to a release method that can smoothly transition between black and white . AB test is a grayscale publishing method that allows some users to continue using A and some users to start using B. If users have no objections to B, then gradually expand the scope and migrate all users to B. Grayscale release can ensure the stability of the overall system. Problems can be discovered and adjusted during the initial grayscale to ensure their impact. […]

Read the full text

Category: NginxTags: cookies, Linux, nginx

Nginx Upstream timed out (110: Connection timed out)

October 25, 2014Mobei

In the Nginx error log, there is a lot of the following information:

Upstream timed out (110: Connection timed out) while reading response header from upstream

This situation mainly occurs in two situations in Xiamen:

1. nginx pro[…]

Read the full text

Category: Nginx Tags: nginx, upstream

HTTP Keepalives

October 21, 2014Mobei

Enabling HTTP Keepalives between nginx and upstream helps improve performance, reduces connection wait time, and can reduce the need for Port occupancy to avoid port exhaustion under heavy traffic conditions.

HTTP protocol uses TCP connections to transmit HTTP requests and receive HTTP responses. HTTP Keepalive allows the reuse of these TCP connections, thereby avoiding the creation of […]

Read more

Category: Nginx Tags: http, Keepalives, nginx

nginx rewrites the trailing slash in the URL

October 13, 2014Mobei

A netizen asked how to add a trailing slash at the end of the URL. By the way, we summarize the rewriting rules for adding and deleting slashes at the end of URLs.

1. Add a slash at the end of the URL

Add a rewrite rule in the virtual host like this:

pid=`ps-ef|grep-v grep|grep nginx|gr[…]
rewrite ^(.*[^/])$ $1/ permanent ;

For example:

server {

listen 80;[…. .]

Read the full text

Category: NginxTags: nginx, Redirect

Using nginx as HTTP load balancing

September 28, 2014 Mobei

1. Introduction

In many applications, load balancing is a commonly used technique to optimize Utilize resources to maximize throughput, reduce wait times, and ensure fault tolerance.

You can use nginx as a very efficient HTTP load balancer to distribute traffic to multiple application servers to improve performance, scalability and high availability.

2. Load balancing method

nginx supports the following load balancing mechanisms:

    […]

Read the full text

Category: NginxTags: loadbance, nginx, Load Balancing

Installing OpenResty

September 26, 2014 Mobei

OpenResty, also known as "ngx_openresty", is a core Nginx-based web application server that contains A large number of third-party Nginx modules and most system dependency packages. OpenResty is not a fork of Nginx, it is just a package. Mainly maintained by Zhang Yichun.

Why OpenResty?

OpenResty allows […]

Read full text

Category: NginxTags: nginx, OpenResty

Nginx implements AJAX cross-domain requests

September 24, 2014Mobei

AJAX requests from one domain to another domain will have cross-domain problems. So how to implement ajax cross-domain request on nginx? To enable cross-domain requests on nginx, add_header Access-Control* directives need to be added. As shown below:

location /{

add_header 'Access-Control-Allow[...]

Read the full text

Category: NginxTags: AJAX, nginx

Nginx Load Balancing: From Theory to Practice

September 22, 2014Mobei

Nginx load balancing has a wide range of applications, and this architecture is used in many scenarios.

The environment is as follows:

192.168.1.100 (master node)  server1
192.168.1.109 (slave)        server2
192.168.1.106 (slave)        serve[......]
Copy after login

Read the full text


The above introduces a very detailed comprehensive description of nginx, including all aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!