tiyorn opened a new issue #6185:
URL: https://github.com/apache/apisix/issues/6185


   ### Issue description
   
   The configuration is as follows:
   ```
   {
     "uri": "/blog/*",
     "name": "test_blog",
     "methods": [
       "GET",
       "POST",
       "PUT",
       "DELETE",
       "PATCH",
       "HEAD",
       "OPTIONS",
       "CONNECT",
       "TRACE"
     ],
     "plugins": {
       "proxy-rewrite": {
         "regex_uri": [
           "/blog/(.*)",
           "/$1"
         ],
         "scheme": "http"
       }
     },
     "plugin_config_id": "common_plugin",
     "upstream": {
       "nodes": [
         {
           "host": "10.132.16.70",
           "port": 80,
           "weight": 1
         }
       ],
       "retries": 3,
       "timeout": {
         "connect": 6,
         "send": 6,
         "read": 6
       },
       "type": "roundrobin",
       "scheme": "http",
       "pass_host": "pass",
       "keepalive_pool": {
         "idle_timeout": 60,
         "requests": 1000,
         "size": 320
       },
       "retry_timeout": 3
     },
     "status": 1
   }
   ```
   
   And the access.log show: 
   `127.0.0.1:9080 "GET /blog/index.php HTTP/1.1" 301 0 0.172 "-" 
"PostmanRuntime/7.26.3" 10.132.16.70:80 301 0.168 
"http://127.0.0.1:9080/index.php"`
   
   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"`
   
   I don't understand why proxy-rewrite.host must be configured, otherwise it 
won't work properly.
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):2.11
   - OS (cmd: `uname -a`):
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - etcd version, if have (cmd: run `curl 
http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   - apisix-dashboard version, if have:
   - the plugin runner version, if the issue is about a plugin runner (cmd: 
depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks 
--version`):
   


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