You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/05/01 15:19:46 UTC

[GitHub] [incubator-apisix] wangyjx opened a new issue #1535: request help: in standalone mode, how to define the route rule to match the host

wangyjx opened a new issue #1535:
URL: https://github.com/apache/incubator-apisix/issues/1535


   ### Issue description
   I am trying to start apisix in standalone mode, but unfortunately I dont know how to make the route to match the host.  
   
   My route configuration is like 
   
   routes:
     -
       uri: /hello
       upstream:
           nodes:
               "127.0.0.1:1980": 1
           type: roundrobin
   
     -
       uri: /serviceStatus
       host: test.xxx.com
       upstream:
           nodes:
               "somehost:32407": 1
           type: roundrobin
   
   #END
   
   when I try to visit http://test.xxx.com/serviceStatus, it always return 
   
   "error_msg": "failed to match any routes". 
   
   Can help me to figure this out?
   
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): 1.1
   * OS: Centos 7.6, docker 
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-apisix] wangyjx commented on issue #1535: request help: in standalone mode, how to define the route rule to match the host

Posted by GitBox <gi...@apache.org>.
wangyjx commented on issue #1535:
URL: https://github.com/apache/incubator-apisix/issues/1535#issuecomment-626117416


   any update on this?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-apisix] moonming commented on issue #1535: request help: in standalone mode, how to define the route rule to match the host

Posted by GitBox <gi...@apache.org>.
moonming commented on issue #1535:
URL: https://github.com/apache/incubator-apisix/issues/1535#issuecomment-624377984


   @membphis please take a look


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-apisix] membphis commented on issue #1535: request help: in standalone mode, how to define the route rule to match the host

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1535:
URL: https://github.com/apache/incubator-apisix/issues/1535#issuecomment-628698326


   I think you should check your ENV again. I confirm it can work fine.
   
   Here is my fully yaml:
   
   ```
   routes:
     -
       uri: /hello
       upstream:
           nodes:
               "127.0.0.1:1980": 1
           type: roundrobin
     -
       uri: /hello2
       hosts:
           - test.com
           - *.foo.com
       upstream:
           nodes:
               "127.0.0.1:1980": 1
           type: roundrobin
   #END
   ```
   
   ![image](https://user-images.githubusercontent.com/6814606/81951577-ea825880-9637-11ea-8f72-f6054817ea07.png)
   


----------------------------------------------------------------
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:
users@infra.apache.org