HTTP-based Reverse proxy

Source: Internet
Author: User
First, installation steps:

cd /appwget http://nginx.org/download/nginx-1.6.3.tar.gzunzip nginx-1.6.3.tar.gzcd /app/nginx-1.6.3./configuremakemake install

Ii. Configuring load Balancing in nginx.conf files

worker_processes1;Events{worker_connections1024x768;}http{includeMime.types;Default_typeApplication/octet-stream;Log_formatMain'$remote _addr - $remote _user [$time _local] "$request"'$status$body _bytes_sent '$http _referer '' "$http _user_agent" "$http _x_forwarded_for" ';UpstreamBaidu {Server10.100.138.1:8080;Server10.100.138.2:8080; }Server{Listen the;server_namewww.baidu.com;Access_log/app/nginx/logs/baidu.log main; Location/  {Proxy_set_headerHost$host;Proxy_set_headerX-real-ip$remote _addr;Proxy_set_headerX-forwarded-for$proxy _add_x_forwarded_for;Proxy_passHttp://baidu; }    }}

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

The above describes the HTTP-based reverse proxy, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • Related Article

    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.