Home > OS >  Centos7 nginx reverse proxy don't have access to 502
Centos7 nginx reverse proxy don't have access to 502

Time:10-12

Centos7 nginx reverse proxy don't have access to 502
Configuration is as follows, mainly is two different server_name, *. X.com, a.x.com
Agent respectively different back-end server, http://139.x.x.x:8090/admin ( tencent cloud server ) is accessible,

A.x.com/admin access and return is always 502, strange,
And *. X.com/admin ( ) are accessible to the

 

Server {
443 SSL http2 listen;
SSL on;
Ssl_certificate/usr/local/nginx/SSL/*. X.com.key.pem;
Ssl_certificate_key/usr/local/nginx/SSL/*. X.com.key;
Ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
Ssl_ciphers EECDH + CHACHA20: EECDH + either AES128: RSA + either AES128: EECDH + AES256: RSA + AES256: EECDH + 3 des, RSA + 3 des:! MD5;
Ssl_prefer_server_ciphers on;
Ssl_session_timeout 10 m;
Ssl_session_cache builtin: 1000 Shared: SSL: 10 m;
Ssl_buffer_size 1400;
Add_header Strict - Transport ws-security Max - age=15768000;
Ssl_stapling on;
Ssl_stapling_verify on;
server_name a.x.com;
Access_log/data/wwwlogs access_nginx. Log combined;
The root/data/mall/dist.
Index index. HTML index. HTM index. PHP;
The location/nginx_status {
stub_status on;
Access_log off;
Allow 127.0.0.1;
Deny all;
}

# forwards the request to the admin
The location/admin {
The root HTML;
Proxy_pass http://139.x.x.x:8090/admin;
Proxy_set_header Host $Host;
Proxy_set_header X - Real - IP $remote_addr;
Proxy_set_header X - Forwarded - For $proxy_add_x_forwarded_for;
# proxy_set_header X-ray Forwarded - Proto $scheme;
Client_max_body_size 100 m;
The index index. HTML index. HTM;
}

}

Server {
443 SSL http2 listen;
SSL on;
Ssl_certificate/usr/local/nginx/SSL/*. X.com.key.pem;
Ssl_certificate_key/usr/local/nginx/SSL/*. X.com.key;
Ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
Ssl_ciphers EECDH + CHACHA20: EECDH + either AES128: RSA + either AES128: EECDH + AES256: RSA + AES256: EECDH + 3 des, RSA + 3 des:! MD5;
Ssl_prefer_server_ciphers on;
Ssl_session_timeout 10 m;
Ssl_session_cache builtin: 1000 Shared: SSL: 10 m;
Ssl_buffer_size 1400;
Add_header Strict - Transport ws-security Max - age=15768000;
Ssl_stapling on;
Ssl_stapling_verify on;
server_name *. X.com;
Access_log/data/wwwlogs access_nginx. Log combined;
The root/data/mall/dist.
Index index. HTML index. HTM index. PHP;
The location/nginx_status {
stub_status on;
Access_log off;
Allow 127.0.0.1;
Deny all;
}

# forwards the request to the admin
The location/admin {
The root HTML;
Proxy_pass http://127.0.0.1:8090/admin;
Proxy_set_header Host $Host;
Proxy_set_header X - Real - IP $remote_addr;
Proxy_set_header X - Forwarded - For $proxy_add_x_forwarded_for;
# proxy_set_header X-ray Forwarded - Proto $scheme;
Client_max_body_size 100 m;
The index index. HTML index. HTM;
}

}

CodePudding user response:

*. X.com including a.x.com

Tencent server caught look forward request to not to, if got killed by tencent
  • Related