PlasticJonbenetDoll opened a new issue, #10287:
URL: https://github.com/apache/apisix/issues/10287

   ### Description
   
   Hello. For some reason when I try to request services on internet I receive 
502 Bad Gateway.
   My route:
   ```
   curl "http://127.0.0.1:9180/apisix/admin/routes/1"; -H "X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
   {
     "methods": ["GET"],
     "host": "example.com",
     "uri": "/anything/*",
     "upstream": {
       "type": "roundrobin",
       "nodes": {
         "httpbin.org:80": 1
       }
     }
   }'
   ```
   And if I do:
   `curl -i -X GET "http://127.0.0.1:9080/anything/foo?arg=10"; -H "Host: 
example.com"`
   
   Response:
   
   ```
   HTTP/1.1 502 Bad Gateway
   Date: Mon, 02 Oct 2023 09:12:14 GMT
   Content-Type: text/html; charset=utf-8
   Content-Length: 229
   Connection: keep-alive
   Server: APISIX/3.5.0
   X-APISIX-Upstream-Status: 502
   
   <html>
   <head><title>502 Bad Gateway</title></head>
   <body>
   <center><h1>502 Bad Gateway</h1></center>
   <hr><center>openresty</center>
   <p><em>Powered by <a 
href="https://apisix.apache.org/";>APISIX</a>.</em></p></body>
   </html>
   ```
   
   But if I try to do simple curl from the same server as apisix it works fine. 
Example:
   `curl -i -X GET "http://httpbin.org:80/anything/foo?arg=10"`
   
   I think there can be a problem with my proxy settings, but I'm not sure how 
should I configure apisix to work with proxy.
   
   
   ### Environment
   
   - APISIX version (run `apisix version`): 3.5
   - Operating system (run `uname -a`): Red Hat
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`):
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to