I have 3 servers, 1 Web server provides external access, and the other two servers QC1 and QC2 are used to store photos saved after recognition by different devices. Their IP addresses are as follows:
Server name | IP address |
---|---|
Web server | 10.76.2.10 |
192.168.100.1 | |
192.168.100.2 |
http://10.76.2.10:8029/media/QC1_20220318T131856_1_CT.jpg, the actual access is
http://192.168.100.1/media/QC1_20220318T131856_1_CT.jpg.
#I don’t know what the if statement written for it is used for, and it can also give a corresponding explanation.
At this time I probably understood that as long as we get the $1 variable, we can reverse the proxy server request based on the file name of the photo. However, the upstream configuration it provided before did not have the addresses corresponding to QC1 and QC2, so we continued to let ChatGPT modify it.
##After adjustments are made, let ChatGPT regenerate a complete nginx configuration.
Okay, we copied this configuration to the server, modified it slightly, restarted Nginx, and used Browse device test.
The above is the detailed content of How to use ChatGPT to solve the problem of Nginx reverse proxy. For more information, please follow other related articles on the PHP Chinese website!