http proxy configuration
1 2 3 4 5 6 7 8 9 10 11 |
|
Configure the proxy ip and port in the browser, and then visit http://www.ip138.com. You can find that the ip has changed. The description is effective
However, the https website cannot be opened. This is because native nginx only supports http forward proxy. In order for nginx to support https forward proxy, you can apply the ngx_http_proxy_connect_module patch. SSL module support
Add https proxy module
You need to recompile nginx here. You need to check the current nginx version and compilation options, and then go to the official website to download the same version of nginx source code and recompile
1 |
|
1 2 |
|
Download the module ngx_http_proxy_connect_module
1 |
|
Patch and modify the nginx source code. This step is very important, otherwise the subsequent make will not pass.
1 |
|
Add the module after the original configuration, pay attention after making Do not install
1 2 3 4 5 |
|
Change the configuration file as follows, and then start the service
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
The above is the detailed content of How to use Nginx proxy to access the Internet. For more information, please follow other related articles on the PHP Chinese website!