The format is simple: proxy_pass URL; The URL includes: transmission protocol (http://, https://, etc.), host name (domain name or IP:PORT), and uri. Here is an example: proxy_pass http://www.xxx.com/; proxy_pass http://192.168.200.101:8080/uri; proxy_pass unix:/tmp/www.sock; There are several things to note about proxy_pass configuration: Assume server_name is www.xxx.com When requesting http://www.xxx.com/aming/a.html, the results of the above examples are Example 1: location /aming/ { proxy_pass http://192.168.1.10; ... } Result 1: http://192.168.1.10/aming/a.html Example 2: location /aming/ { proxy_pass http://192.168.1.10/; ... } Result 2: http://192.168.1.10/a.html Example 3: location /aming/ { proxy_pass http://192.168.1.10/linux/; ... } Result 3: http://192.168.1.10/linux/a.html Example 4: location /aming/ { proxy_pass http://192.168.1.10/linux; ... } Result 4: http://192.168.1.10/linuxa.html Summarize: For ease of memory and standardized configuration, it is recommended that all URLs after proxy_pass end with "/". proxy_pass http://192.168.1.10/linux/; This is the end of this article about the implementation of proxy_pass in nginx reverse proxy. For more relevant nginx reverse proxy proxy_pass content, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Vue implements a simple shopping cart example
>>: Summary of HTML formatting standards for web-based email content
sort Sort the contents of a text file Usage: sort...
Generally, after there is a menu on the left, the...
Table of contents Preface preparation Go! text St...
This article example shares the specific code of ...
After installing the MySQL database using the rpm...
premise In complex scenarios, a lot of data needs...
Written in front In today's Internet field, N...
1.1 Introduction By enabling the slow query log, ...
As shown below: #!/usr/bin/env python3.5 import p...
Table of contents 1. Anti-shake 2. Throttling 3. ...
Introduction MySQL 5.7 aims to be the most secure...
Here is an example code for using regular express...
1. One-click installation of Mysql script [root@u...
Now we can use an attribute of input called autoco...
Build the image There are two main ways to build ...