docs(getting-started): fix '502 Bad Gateway' error in the getting sta… #12780
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…rted tutorial
Description
When following the getting-started guide, a 502 Bad Gateway response is returned.
root@28d6b762434f:/workspace# curl "http://127.0.0.1:9080/ip
<title>502 Bad Gateway</title>502 Bad Gateway
openresty
Powered by APISIX.
Based on my validation, I found that the
pass_host: "node"configuration must be added to the route to make APISIX send rightHostheader to httpbin.org to get a correct response (instead of 502 errors).root@28d6b762434f:/workspace# curl -m 5 -v "http://httpbin.org/ip"
* Connected to httpbin.org (100.29.246.92) port 80
> GET /ip HTTP/1.1
> Host: httpbin.org
> User-Agent: curl/8.5.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Connection: close
< Content-Length: 34
< Access-Control-Allow-Credentials: true
< Access-Control-Allow-Origin: *
< Content-Type: application/json
< Date: Thu, 27 Nov 2025 04:33:11 GMT
< Server: gunicorn/19.9.0
<
{
"origin": "101.x.x.177"
}
root@28d6b762434f:/workspace# curl -m 5 -v "http://httpbin.org/ip" -H "Host: 127.0.0.1:9080"
* Connected to httpbin.org (3.219.87.227) port 80
> GET /ip HTTP/1.1
> Host: 127.0.0.1:9080
> User-Agent: curl/8.5.0
> Accept: */*
>
* Operation timed out after 5002 milliseconds with 0 bytes received
curl: (28) Operation timed out after 5002 milliseconds with 0 bytes received
root@28d6b762434f:/workspace# curl -m 5 -v "http://httpbin.org/ip" -H "Host: 127.0.0.1:9080"
* Connected to httpbin.org (100.29.246.92) port 80
> GET /ip HTTP/1.1
> Host: 127.0.0.1:9080
> User-Agent: curl/8.5.0
> Accept: */*
* Empty reply from server
* Closing connection
curl: (52) Empty reply from server
Which issue(s) this PR fixes:
Checklist