Protocol selection of Nginx Proxy

Source: Internet
Author: User

1, the Ip_local_port_range problem in Nginx

# Sysctl-a | grep ip_local

Net.ipv4.ip_local_port_range = 3276861000

# Sysctl-a | grep ip_local_port_range

Net.ipv4.ip_local_port_range = 1024061000

2, nginx.conf

Upstream P2p_service {

keepalive;

Server 127.0.0.1:29980;

Server 127.0.0.1:29981;

}

server {

Listen 29080;

server_name v2.hongbaodai.com;

Location/{

Proxy_http_version 1.1;

proxy_set_header Connection "";

Proxy_set_header Host $host;

# Proxy_set_header x-forwarded-for $proxy-add_x_forwarded_for;

Proxy_connect_timeout 3;

Proxy_send_timeout 3;

Proxy_read_timeout 3;

Proxy_buffer_size 256k;

Proxy_buffers 4 256k;

Proxy_busy_buffers_size 256k;

Proxy_temp_file_write_size 256k;

Proxy_next_upstream Error timeout Invalid_header http_500 http_503 http_404;

Proxy_max_temp_file_size 128m;

Proxy_pass Http://p2p_service;

Proxy_redirect default;

}

}


Protocol selection of Nginx Proxy

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.