Protected IP Returns 502
Problem
An HTTP or HTTPS request through the protected IP returns 502 Bad Gateway. This generally means the proxy did not receive a valid response from the origin, but you must confirm the cause using the origin rule and origin logs.
Common Causes
Origin Rule Mismatch
The protocol, proxy port, origin address, origin port, or domain does not match the application.
Origin Unavailable
The service is not listening, is overloaded, times out, or returns an invalid response.
Network Access Blocked
A firewall, security group, or route blocks forwarding traffic.
TLS Misconfiguration
The HTTPS certificate, domain, SNI, or certificate chain is incorrect.
Troubleshooting
1. Check the Origin Rule
Open Origin Configuration for the instance and verify:
- Protocol and proxy port.
- Origin server address and port.
- Domain used by HTTP/HTTPS rules.
- Scheduling policy and other protocol-specific options.
2. Test the Origin from a Trusted Network
Send a request using the real protocol and port. Virtual hosts and HTTPS services require the correct domain; testing the IP alone is insufficient.
curl -I --resolve example.com:443:192.0.2.10 https://example.com/
3. Check the Origin
- Confirm the service is listening on the target port.
- Review application and reverse-proxy error logs.
- Check CPU, memory, connection counts, and upstream dependencies.
- Confirm firewall and security-group access for verified forwarding sources.
4. Check HTTPS
- The certificate is valid.
- The certificate matches the forwarding domain.
- The certificate chain is complete.
- The origin completes a TLS handshake using the correct SNI.
Apply and Verify a Fix
- Correct the origin protocol, port, domain, or server based on the diagnosis.
- Save the rule and wait for the page to confirm completion.
- Test again through the production domain associated with the protected IP.
- Review origin access logs to confirm that the request reached the intended service.
- If the issue remains, restore the previous configuration and collect evidence for further diagnosis.
Support
If the issue remains unresolved, email hy.swzx@hiddos.cn with:
- Instance ID, protected IP, and access domain.
- Origin protocol, proxy port, and origin address.
- Event time, frequency, and complete response.
- Origin access logs, error logs, and relevant configuration screenshots.
