In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "the usage of nginx anti-proxy server". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the usage of nginx anti-proxy server.
Nginx anti-proxy configuration:
Server {
Listen 8082
Server_name localhost,10.20.1.160
# charset utf-8
# index index.php index.html index.htm
Root / app/usercenter/web
# charset koi8-r
# access_log / var/log/nginx/log/host.access.log main
Location / 132/8080/ {
Proxy_pass http://10.20.1.132:8080/;
Client_max_body_size 10m; # the maximum number of bytes per file that the client is allowed to request
Client_body_buffer_size 128k; # buffer proxy buffers maximum number of bytes requested by the client
Proxy_connect_timeout 300; # nginx connection timeout with backend server (proxy connection timeout)
Proxy_send_timeout 300; # backend server data backhaul time (proxy send timeout)
Proxy_read_timeout 300; # response time of back-end server after successful connection (proxy received timeout)
Proxy_buffer_size 4k; # sets the buffer size of the proxy server (nginx) for storing account information
Proxy_buffers 4 32k; # proxy_buffers buffer, if the average page size is less than 32k, set it like this
Proxy_busy_buffers_size 64k; # buffer size under high load (proxy_buffers*2)
Proxy_temp_file_write_size 64k; # sets the cache folder size. If it is larger than this value, it will be passed from the upstream server.
}
Location / 132/8081/ {
Proxy_pass http://10.20.1.132:8081/;
Client_max_body_size 10m; # the maximum number of bytes per file that the client is allowed to request
Client_body_buffer_size 128k; # buffer proxy buffers maximum number of bytes requested by the client
Proxy_connect_timeout 300; # nginx connection timeout with backend server (proxy connection timeout)
Proxy_send_timeout 300; # backend server data backhaul time (proxy send timeout)
Proxy_read_timeout 300; # response time of back-end server after successful connection (proxy received timeout)
Proxy_buffer_size 4k; # sets the buffer size of the proxy server (nginx) for storing account information
Proxy_buffers 4 32k; # proxy_buffers buffer, if the average page size is less than 32k, set it like this
Proxy_busy_buffers_size 64k; # buffer size under high load (proxy_buffers*2)
Proxy_temp_file_write_size 64k; # sets the cache folder size. If it is larger than this value, it will be passed from the upstream server.
}
Error_page 500 502 503 504 / 50x.html
Location = / 50x.html {
Root / usr/share/nginx/html
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
# location ~\ .php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
# location ~ /\ .ht {
# deny all
#}
}
At this point, I believe you have a deeper understanding of "the use of nginx anti-proxy server". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.