FunnySunshine520 opened a new issue #1418: request help: Upstream: How to add a 
node with domain name correctly?
URL: https://github.com/apache/incubator-apisix/issues/1418
 
 
   ### 我是一个apisix新用户,在使用新建upstream时使用域名+port作为node时遇到问题。
   当我新建一个upstream和一个route后,
   使用get请求该路由时(http://127.0.0.1:9080/x/api/business/test-es-data),返回:
   `Not Found
   The requested URL was not found on this server.
   
   Additionally, a 404 Not Found error was encountered while trying to use an 
ErrorDocument to handle the request.
   
   Apache/2.4.41 Server at 127.0.0.1 Port 80`
   
   **upstream配置如下**:
   `{
        "type": "roundrobin",
        "nodes": {
            "saleinterface.com:80": 1
        },
        "desc": "本地-测试1"
    }`
   
   **route配置如下**:
   `curl -i http://127.0.0.1:9080/apisix/admin/routes/75 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "desc": "调通测试",
       "uri": "/x/api/business/test-es-data",
       "plugins": {
           "limit-count": {
               "count": 2,
               "time_window": 60,
               "rejected_code": 503,
               "key": "remote_addr"
           }
       },
       "upstream_id": "67"
   }'`
   
   ### 
当我的upstream使用ip+port的形式时,请求同一路由时(http://127.0.0.1:9080/x/api/business/test-es-data),返回正常结果
   **修改后的upstream配置**:
   `curl http://127.0.0.1:9080/apisix/admin/upstreams/67 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -i -X PUT -d '
    {
        "type": "roundrobin",
        "nodes": {
            "127.0.0.1:8088": 1
        },
        "desc": "本地-测试1"
    }'`
   
   
   * 我的http://saleinterface.com/x/api/business/test-es-datahttp://127.0.0.1:8088/x/api/business/test-es-data , 请求的是同一个接口,直接调用是请求成功的
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to