Nginx forward Proxy

Source: Internet
Author: User

(a) Network architecture

Client A: Operating system: Windows Local Area Connection: ip:192.168.1.149 Gateway: 192.168.1.1 (Router address) dns:192.168.1.1 (router address) subnet mask: 255.255.255.0VMware Network Adapter vmnet1:ip:192.168.3.1 (used to communicate with virtual machines) Server B: Operating system: Linux (Virtual machine) eth1: Use bridge mode to communicate with external network ip:192.168.1.111 Gateway: 192.168.1.1 (Router address) dns:192.168.1.1 (router address) subnet mask: 255.255.255.0eth2:ip:192.168.3.2 (and A's VMware Network Adapter VMnet1 on the same network segment) by default A is available for Internet access.

(ii) Configuring the Forward proxy Server

Configuration on Server B 1) Modify nginx config file [[email protected] sites-available]# VI nginx_main.conf resolver 192.168.1.1;server {Listen        8090;        Location/{Proxy_pass http:/$http _host$request_uri; }}2) restart Nginx:[[email protected] sites-available]# service Nginx restart

(iii) Client settings
1) Now in order to simulate the forward proxy, the local connection IP address of a is changed to 192.168.2.149, at which point a can not access the extranet
2) Modify the settings of a IE browser (set IE proxy)
Click Tools-Internet Options-connect-LAN settings

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/1A/wKiom1So6uKRJZ7DAAIrEoRAQG4023.jpg "style=" float: none; "title=" 1.png "alt=" Wkiom1so6ukrjz7daaireoraqg4023.jpg "/>

Modified into

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/17/wKioL1So657A3ICHAAFR9ulmOC0057.jpg "style=" float: none; "title=" 2.png "alt=" Wkiol1so657a3ichaafr9ulmoc0057.jpg "/>

is shown

3) access the extranet via IE again (confirm that the firewall on Server B has released the 8090-Port packet)
Discovery can be accessed to the extranet, the experiment succeeded









Nginx forward 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.