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 2022/01/28 03:34:32 UTC

[GitHub] [apisix] leslie-tsang commented on issue #6185: request help: Why proxy-rewrite.host must be configured when starting the proxy-rewrite plugin, otherwise it will be forwarded directly to 127.0.0.1 by default, even if upstream.nodes is configured?

leslie-tsang commented on issue #6185:
URL: https://github.com/apache/apisix/issues/6185#issuecomment-1023854969


   > I don't understand why proxy-rewrite.host must be configured, otherwise it won't work properly.
   
   Hello there, `proxy-rewrite.host` is an optional configuration, which mean the request will be send to the `upstream` with the request header `Host: <proxy-rewrite.host>`, `proxy-rewrite` plugin work as expected.
   
   > When proxy-rewrite.host is configured as 10.132.16.70, it is normal. At this time, the log is:
   > 
   > 127.0.0.1:9080 "GET /blog/index.php HTTP/1.1" 301 0 0.179 "-" "PostmanRuntime/7.26.3" 10.132.16.70:80 301 0.176 "http://10.132.16.70/index.php"
   
   The config work as you expected due to `upstream.nodes.host` has been set to `10.132.16.70:80`, It is not due to the `proxy-rewrite.host` configuration taking effect.
   
   @juzhiyuan Consider solved. Feel free to reopen it if needed.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org