i use nginx to deploy some projects together,when i use a domain name to enter one of the web page ,the page is slow to load video(eg:www.xxxxxx.com).but when i use domain name + port or ip+port to enter,the speed is normal(eg:wwww.xx.com:9023,xx.xx.xx.xx:9023).
here is part of my nginx configuration.(some project is deploy with nginx in a same machine,but some projects are other machine, and all projects are coding in different languages. that means there is no link between the projects)
server
{
listen 80;
server_name xxx1.com;
proxy_http_version 1.1;
location / {
proxy_set_header Host $Host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:9025/;
proxy_redirect http://127.0.0.1:9025/ ;
}
}
server{
listen 80;
server_name www.xxx2.com;
proxy_http_version 1.1;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://www.xxx2.com.com:9023; # Reverse proxy to port 9023
}
}
server{
listen 80;
server_name xxx3.com;
proxy_http_version 1.1;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://xxx3.com:9024; # Reverse proxy to port 9024
2 methods tried
1.i hava try to add proxy_buffer under “location”.
proxy_buffer_size 128000k;
proxy_buffers 32 128000k;
proxy_busy_buffers_size 128000k;
2.add worker_connections.
worker_connections 10240;
- change proxy_pass to ip
proxy_pass http://39.170.xx.xx:9023
but it all doesnt work
i dont know what i should add to nginx or my method that use nginx to do routing distribution is error. because i only have one public network ip and many place hava to use 80,i have to use nginx to do routing distribution.