mscb402 commented on issue #8709:
URL: https://github.com/apache/apisix/issues/8709#issuecomment-1398026429

   I really don't know why this can't work for your local system.
   This is my step.
   First, create an upstream.
   ```json
   {
     "nodes": [
       {
         "host": "httpbin.org",
         "port": 80,
         "weight": 1
       }
     ],
     "timeout": {
       "connect": 6,
       "send": 6,
       "read": 6
     },
     "type": "roundrobin",
     "scheme": "http",
     "pass_host": "pass",
     "name": "httpbin",
     "keepalive_pool": {
       "idle_timeout": 60,
       "requests": 1000,
       "size": 320
     }
   }
   ```
   I'm using `httpbin.org` for the test.
   <img width="1050" alt="image" 
src="https://user-images.githubusercontent.com/11229089/213642473-53840dbd-b85f-414e-9004-54f236718e40.png";>
   Now I get an upstream id: 444043510262268609
   
   Secondly, open a `Raw data editor` in route config page.
   <img width="265" alt="image" 
src="https://user-images.githubusercontent.com/11229089/213642851-a2ecf3bd-af5d-4bf3-ad5e-11d53bc9293f.png";>
   
   Then, paste all configs you are posting previously. Only change upstream id 
to my upstream id
   <img width="684" alt="image" 
src="https://user-images.githubusercontent.com/11229089/213642943-87dd06a8-34b4-48e2-9e42-f1275cd5ccfe.png";>
   
   Then, create this route successfully.
   <img width="951" alt="image" 
src="https://user-images.githubusercontent.com/11229089/213643215-80951ab0-2c5f-4edc-a2d8-011bf4479cce.png";>
   
   Finally, I access from curl
   <img width="554" alt="image" 
src="https://user-images.githubusercontent.com/11229089/213643475-a98eddd4-50db-44e3-950d-7e3ebb8880a9.png";>
   
   <img width="553" alt="image" 
src="https://user-images.githubusercontent.com/11229089/213643552-86877b07-c82c-4f59-90f4-f38d1bca2959.png";>
   
   You can see, I access using `/food/get`, and APISIX has rewritten this URL 
to `/get` success.
   So when I access `http://localhost:9080/food/get` APISIX will access 
`http://httpbin.org/get` and return what their return.
   This means everything works correctly.


-- 
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