mscb402 commented on issue #8803: URL: https://github.com/apache/apisix/issues/8803#issuecomment-1420299468
First of all, I don't know what kind of scenario you have. First I need to clarify that if your APISIX Gateway is working on port 9080, then you want to jump to the service "http://domain.com/index" which belongs to port 80, which is not under Gateway control. If you want to access "http://domain.com" to reach the Gateway, then you should configure APISIX to listen on port 80. If we do not consider the correct way to use it, and you understand the premise of what I said. You do need a 301 bounce to "http://domain.com/index". You need to first create a "/" route and then add a "redirect" plugin with the following configuration: ``` { "uri": "/", "name": "test", "methods": [ "GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "CONNECT", "TRACE", "PURGE" ], "plugins": { "redirect": { "ret_code": 302, "uri": "http://domain.com/index" } }, "upstream": { "nodes": [ { "host": "httpbin.org", "port": 80, "weight": 1 } ], "timeout": { "connect": 6, "send": 6, "read": 6 }, "type": "roundrobin", "scheme": "http", "pass_host": "pass", "keepalive_pool": { "idle_timeout": 60, "requests": 1000, "size": 320 } }, "status": 1 } ``` -- 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]
