upstream test1{
server {
listen 80; # default backlog=2048;

# listen 443 default ssl;
# ssl on;

# ssl_certificate ./ssl2/server.crt;
# ssl_certificate_key ./ssl2/server.key;
server_name ;
# server_name;
#charset koi8-r;

#access_log logs/host.access.log main;

location / {
# proxy_redirect off;
# proxy_pass;
# root /var/www/html;
# index index.html index.htm index.php;

# Forwarding header contains ip And the agent ip
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# Do not use cache
proxy_buffering off;
proxy_pass http://test1;

Nginx Load balancing uses ip More articles about

  1. Nginx Load balancing The back-end server obtains the front-end user's real IP

    Nginx Back end Log files All you get is front end Of the load balancer IP Want to get the user's reality IP must Use Nginx Module  http_realip_module   Talent !! 1. compile Nginx When ...

  2. Nginx Load balanced 4 Ways of planting : polling -Round Robin 、Ip Address -ip_hash、 The minimum connection -least_conn、 weighting -weight=n

    The concept of load balancing and nginx Make a summary of load balancing implementation : Let's talk about the concept of load balancing : Load Balance Load balancing is used to solve the problem of a machine ( A process ) An algorithm that cannot solve all requests . We know that single service ...

  3. How to configure nginx Load balancing configuration ( polling , The weight ,ip binding )

    The purpose of cluster is to solve the problem that a single node cannot serve high concurrency , In the cluster nginx How to allocate requests that will come from clients Forward to the server Load balancing can improve the throughput of a website ( Acceptance and response ), Reduce the pressure on a single server Load balancing provides three strategies : polling ...

  4. Linux(7)- Nginx.conf Master profile 、Nginx Virtual host / Access log / Limit access to IP/ Error page optimization 、Nginx Reverse proxy 、Nginx Load balancing

    One .Nginx.conf Master profile Nginx Master profile conf/nginx.conf It's a plain text file , The entire configuration file is organized in blocks . commonly , Each block has a pair of braces {} To show the beginning and the end . Core model ...

  5. nginx Load balancing cluster

    nginx Load balancing cluster   0. Preface :nginx Load balancing , It belongs to the Internet 7 Application layer in layer model , To put it bluntly, it's an agent , Use upstrem Module implementation , Agents use proxy modular 1. You can forward the domain name ,lvs Only for ...

  6. Hands teach you to play nginx Load balancing ( Two )---- Install the virtual machine operating system

    introduction In the last article , We've assembled the hardware part of the virtual machine , So now we're going to install the operating system , Since it's a server , Then install linux Operating system is a better choice , If you like , install windows There is no problem I choose here ...

  7. nginx Load balancing is based on ip_hash Of session Sticky stick

    nginx Load balancing is based on ip_hash Of session Sticky stick nginx According to the client IP Load balancing , stay upstream Set in the ip_hash, You can target the same C The client in the class address segment selects the same back-end server , except ...

  8. Net Distributed system II :CentOS System building Nginx Load balancing

    One . About CentOS System introduction CentOS(Community Enterprise Operating System, Chinese meaning : Community enterprise operating system ) yes Linux One of the releases , It comes from Red Hat ...

  9. Net Distributed system three :Keepalived+LVS+Nginx High availability of load balancing

    The last one wrote nginx Load balancing , This article realizes high availability (HA). The overall design of the system adopts Nginx Load balancing , If it appears Nginx Single machine failure , Then the whole system cannot run normally . High availability requirements for system architecture design , We need to solve Nginx ...

Random recommendation

  1. yii2 Of urlManager To configure

    URL pseudo static is a very common website requirement ,Yii2 It's very easy to configure . First , In profile config/main.php Of 'components' In the paragraph , Add the following settings :'urlManager'=>a ...

  2. [Angularjs] common api function

    Write it at the front stay angularjs Some common functions are provided in , such as angular.lowercase(),angular.uppercase(),angular.isString(),angular.isNu ...

  3. BC.5200.Trees(dp)

    Trees  Accepts: 156  Submissions: 533  Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 65536/6 ...

  4. (WPF, Service) Delete... From the registry USB Enum value .

    Task: Delete HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_0XXX&PID_0XXX Key Tree The first thing to think of is to make ...

  5. Use EF code first and mvc4 Summary of problems encountered

    Recently used EF code first and mvc4 Do the project , There are some problems , Make a note of . One .EF code first Generating foreign key columns . In general , They all write one first int Type foreign key id attribute , Then write an outside ...

  6. Js Traverse Josn object ( Content comparison page implementation ideas )

    Better traversal Josn Methods , utilize jquery Of each Method : var arr1 = [ "one", "two", "three", &quo ...

  7. Android, Use Json Sending data , The use of Java Escape character KanKan original

    kankan original And php When sending data in the background . This format is required . private void sendJson(){ // Initialize self defined handler CashHandler handler = n ...

  8. Ubuntu Lower installation Android SDK( Text course )

    Rigid contact Ubuntu, For me, the most urgent thing is to put Android Environment I have written in detail in my blog before JDK,Eclipse,ADT Installation .. Now write down SDK Installation 1. download Linux Version of Andr ...

  9. [UWP- Xiao Bai's diary 13]Composition Animation

    Preface First , To compare traditional animation with Composition Animation . Look at the picture to see composition The advantage of animation is too obvious, as the official said, greatly reduces the difficulty of animation and the amount of code . Traditional animation , Take the most common is excessive animation : Into the ...

  10. java Common framework Introduction

    One .SpringMVC Spring Web MVC It's based on Java Realized. Web MV ...