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 2021/01/12 02:52:25 UTC

[GitHub] [apisix] Yangzcy423911 opened a new issue #3252: request help: apisix proxy_rewrite to upstream

Yangzcy423911 opened a new issue #3252:
URL: https://github.com/apache/apisix/issues/3252


   ### Issue description
   
   ### Environment
   
   * apisix version (cmd: `apisix version`):2.2
   * OS: (cmd: `uname -a`) Centos7
   * OpenResty / Nginx version: (cmd: `nginx -V` or `openresty -V`)
   


----------------------------------------------------------------
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] [apisix] Yangzcy423911 commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Yangzcy423911 commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758532112


   At present, because the front and back end write the dead path / apimix / admin in the code, which is the same as the apimix control panel interface, I don't have a better solution at present. I hope you can help me solve it
   
   


----------------------------------------------------------------
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] [apisix] spacewander commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758383842


   Please read the doc:
   https://github.com/apache/apisix/blob/master/doc/architecture-design.md
   https://github.com/apache/apisix/blob/master/doc/customize-nginx-configuration.md


----------------------------------------------------------------
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] [apisix] Firstsawyou commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758455614


   @Yangzcy423911 
   How is your route configured? Can you see your configuration information?


----------------------------------------------------------------
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] [apisix] Yangzcy423911 commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Yangzcy423911 commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758430380


   #浏览器访问相关日志 
   Request URL: http://api-gateway.test.com/apisix/admin/user/login
   Request Method: POST
   Status Code: 401 Unauthorized


----------------------------------------------------------------
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] [apisix] github-actions[bot] closed issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #3252:
URL: https://github.com/apache/apisix/issues/3252


   


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



[GitHub] [apisix] Yangzcy423911 commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Yangzcy423911 commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758453757


   {
       "node": {
           "value": {
               "update_time": 1610435029,
               "methods": [
                   "GET",
                   "HEAD",
                   "POST",
                   "PUT",
                   "DELETE",
                   "OPTIONS",
                   "PATCH"
               ],
               "upstream": {
                   "pass_host": "pass",
                   "type": "roundrobin",
                   "nodes": [
                       {
                           "host": "172.27.0.201",
                           "port": 19001,
                           "weight": 1
                       }
                   ],
                   "timeout": {
                       "connect": 6000,
                       "send": 6000,
                       "read": 6000
                   }
               },
               "id": "337063379434734478",
               "hosts": [
                   "api-gateway.test.com"
               ],
               "name": "UAT-GATEWAY-FRONT-ADMIN",
               "status": 1,
               "uris": [
                   "/admin/*"
               ],
               "create_time": 1610435029,
               "plugins": {
                   "proxy-rewrite": {
                       "disable": false,
                       "uri": "/admin"
                   }
               },
               "vars": {}
           },
           "key": "/uat-apisix/routes/337063379434734478"
       },
       "count": "1",
       "action": "get"
   }
   
   I try it ,but fail


----------------------------------------------------------------
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] [apisix] Yangzcy423911 commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Yangzcy423911 commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758433501


   What I need to implement now is to access the API through the API IX service gateway- gateway.test.com It can log in and operate related routing information normally


----------------------------------------------------------------
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] [apisix] Yangzcy423911 edited a comment on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Yangzcy423911 edited a comment on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758531251


   Briefly, the front end is the front end of apimix, and the back end is the apimix manager service. You want to use apimix as the entry to access and log in.
   
   
   success use nginx config file 
   
   ```nginx
       serveranme 192.168.12.1;
       location ^~ / {
           try_files $uri $uri/ /index.html;
       }
       location /apisix/admin {
           proxy_pass http://192.168.12.1:80000/apisix/admin;
       }
   ```


----------------------------------------------------------------
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] [apisix] Firstsawyou commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758441882


   > I don't quite understand. This is modified there. Can you give me a more detailed location? Does the front end code need to be modified
   
   Wait a moment, I will give you an example.


----------------------------------------------------------------
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] [apisix] Yangzcy423911 commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Yangzcy423911 commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758425333


   # 匹配: /apisix/admin开头的路由
   {
       "node": {
           "value": {
               "update_time": 1610430995,
               "methods": [
                   "GET",
                   "HEAD",
                   "POST",
                   "PUT",
                   "DELETE",
                   "OPTIONS",
                   "PATCH"
               ],
               "id": "337056610549498766",
               "hosts": [
                   "api-gateway.test.com"
               ],
               "name": "UAT-GATEWAY-FRONT-ADMIN",
               "status": 1,
               "uris": [
                   "/apisix/admin/*"
               ],
               "create_time": 1610430995,
               "upstream_id": "336930990507164558",
               "vars": {}
           },
           "key": "/uat-apisix/routes/337056610549498766"
       },
       "count": "1",
       "action": "get"
   }


----------------------------------------------------------------
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] [apisix] Firstsawyou commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758528502


   > 参考你的建议修改/admin匹配的路由
   > {
   > "node": {
   > "value": {
   > "update_time": 1610435275,
   > "methods": [
   > "GET",
   > "HEAD",
   > "POST",
   > "PUT",
   > "DELETE",
   > "OPTIONS",
   > "PATCH"
   > ],
   > "upstream": {
   > "pass_host": "pass",
   > "type": "roundrobin",
   > "nodes": [
   > {
   > "host": "192.168.12.1",
   > "port": 80000,
   > "weight": 1
   > }
   > ],
   > "timeout": {
   > "connect": 6000,
   > "send": 6000,
   > "read": 6000
   > }
   > },
   > "id": "337063379434734478",
   > "hosts": [
   > "api-gateway.test.com"
   > ],
   > "name": "UAT-GATEWAY-FRONT-ADMIN",
   > "status": 1,
   > "uris": [
   > "/admin/*"
   > ],
   > "create_time": 1610435029,
   > "plugins": {
   > "proxy-rewrite": {
   > "disable": true,
   > "uri": "/admin"
   > }
   > },
   > "vars": {}
   > },
   > "key": "/uat-apisix/routes/337063379434734478"
   > },
   > "count": "1",
   > "action": "get"
   > }
   
   You need to configure it according to your actual interface situation.


----------------------------------------------------------------
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] [apisix] Yangzcy423911 commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Yangzcy423911 commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758499440


   # 匹配/*的路由
   {
       "node": {
           "value": {
               "update_time": 1610432793,
               "methods": [
                   "GET",
                   "HEAD",
                   "POST",
                   "PUT",
                   "DELETE",
                   "OPTIONS",
                   "PATCH"
               ],
               "id": "337052655337603982",
               "hosts": [
                   "api-gateway.test.com"
               ],
               "name": "UAT-GATEWAY-FRONT",
               "status": 1,
               "uris": [
                   "/*"
               ],
               "upstream_id": "336935451669562254",
               "create_time": 1610428637,
               "plugins": {
                   "ip-restriction": {
                       "disable": false,
                       "whitelist": [
                           "1.1.1.1",
                           "2.2.2.2"
                       ]
                   }
               },
               "vars": {}
           },
           "key": "/uat-apisix/routes/337052655337603982"
       },
       "count": "1",
       "action": "get"
   }


----------------------------------------------------------------
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] [apisix] Firstsawyou commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758537888


   This is my email: `yuelinz99@gmail.com`. Let's get in touch and take a look at your question.


----------------------------------------------------------------
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] [apisix] Firstsawyou edited a comment on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Firstsawyou edited a comment on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758448754


   Corresponding to the following use cases:
   
   ```
   location /apisix/admin {
         proxy_pass http://192.168.12.1:80000/apisix/admin;
   }
   ```
   
   We can try proxy-rewrite plugin to achieve. Note that the uri of the route cannot use `/apisix/admin/*`, it needs to be changed here. Example:
   
   ```sehll
   curl http://127.0.0.1:9080/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "methods": ["GET"],
       "uri": "/admin/*",
       "plugins": {
           "proxy-rewrite": {
               "uri": "/admin",
               "scheme": "http"            
           }
       },
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "192.168.12.1:80000": 1
           }
       }
   }'
   ```
   
   You can try this example.


----------------------------------------------------------------
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] [apisix] Firstsawyou commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758431887


   Hi, @Yangzcy423911 
   `/apisix/admin/` is the interface of APISIX control plane, you cannot use this interface directly. It is recommended that you change an interface name.


----------------------------------------------------------------
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] [apisix] Yangzcy423911 commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Yangzcy423911 commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758531251


   Briefly, the front end is the front end of apimix, and the back end is the apimix manager service. You want to use apimix as the entry to access and log in.
   
   
   success use nginx config file 
   serveranme 192.168.12.1;
   location ^~ / {
   try_files $uri $uri/ /index.html;
   }
   location /apisix/admin {
   proxy_pass http://192.168.12.1:80000/apisix/admin;
   }
   
   
   
   
   


----------------------------------------------------------------
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] [apisix] Firstsawyou edited a comment on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Firstsawyou edited a comment on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758455614


   @Yangzcy423911 
   How is your route configured? Can you see your configuration information? You can fake a configuration.


----------------------------------------------------------------
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] [apisix] Firstsawyou edited a comment on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Firstsawyou edited a comment on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758448754


   Corresponding to the following use cases:
   
   ```
   location /apisix/admin {
         proxy_pass http://192.168.12.1:80000/apisix/admin;
   }
   ```
   
   We can try proxy-rewrite plugin to achieve. Note that the uri of the route cannot use `/apisix/admin/*`, it needs to be changed here. Example:
   
   ```sehll
   curl http://127.0.0.1:9080/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "methods": ["GET"],
       "uri": "/admin/*",
       "plugins": {
           "proxy-rewrite": {
               "uri": "/admin/*",
               "scheme": "http"            
           }
       },
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "192.168.12.1:80000": 1
           }
       }
   }'
   ```
   
   You can try this example.


----------------------------------------------------------------
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] [apisix] Yangzcy423911 edited a comment on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Yangzcy423911 edited a comment on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758453757


   {
       "node": {
           "value": {
               "update_time": 1610435029,
               "methods": [
                   "GET",
                   "HEAD",
                   "POST",
                   "PUT",
                   "DELETE",
                   "OPTIONS",
                   "PATCH"
               ],
               "upstream": {
                   "pass_host": "pass",
                   "type": "roundrobin",
                   "nodes": [
                       {
                           "host": "192.168.12.1",
                           "port": 80000,
                           "weight": 1
                       }
                   ],
                   "timeout": {
                       "connect": 6000,
                       "send": 6000,
                       "read": 6000
                   }
               },
               "id": "337063379434734478",
               "hosts": [
                   "api-gateway.test.com"
               ],
               "name": "UAT-GATEWAY-FRONT-ADMIN",
               "status": 1,
               "uris": [
                   "/admin/*"
               ],
               "create_time": 1610435029,
               "plugins": {
                   "proxy-rewrite": {
                       "disable": false,
                       "uri": "/admin"
                   }
               },
               "vars": {}
           },
           "key": "/uat-apisix/routes/337063379434734478"
       },
       "count": "1",
       "action": "get"
   }
   
   I try it ,but fail


----------------------------------------------------------------
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] [apisix] Firstsawyou commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758436547


   You can change `/apisix/admin/*`, for example: `/admin/*`.


----------------------------------------------------------------
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] [apisix] Firstsawyou commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758448754


   Corresponding to the following use cases:
   
   ```
   location /apisix/admin {
   proxy_pass http://192.168.12.1:80000/apisix/admin;
   }
   ```
   
   We can try proxy-rewrite plugin to achieve. Note that the uri of the route cannot use `/apisix/admin/*`, it needs to be changed here. Example:
   
   ```sehll
   curl http://127.0.0.1:9080/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "methods": ["GET"],
       "uri": "/admin/*",
       "plugins": {
           "proxy-rewrite": {
               "uri": "/admin/*",
               "scheme": "http"            
           }
       },
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "192.168.12.1:80000": 1
           }
       }
   }'
   ```
   
   You can try this example.


----------------------------------------------------------------
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] [apisix] Yangzcy423911 commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Yangzcy423911 commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758437558


   I don't quite understand. This is modified there. Can you give me a more detailed location? Does the front end code need to be modified


----------------------------------------------------------------
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] [apisix] Yangzcy423911 commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Yangzcy423911 commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758432934


   Hi   Thank you. I see. How to modify it according to the above routing information,
   
   


----------------------------------------------------------------
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] [apisix] Yangzcy423911 commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Yangzcy423911 commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758500268


   参考你的建议修改/admin匹配的路由
   {
       "node": {
           "value": {
               "update_time": 1610435275,
               "methods": [
                   "GET",
                   "HEAD",
                   "POST",
                   "PUT",
                   "DELETE",
                   "OPTIONS",
                   "PATCH"
               ],
               "upstream": {
                   "pass_host": "pass",
                   "type": "roundrobin",
                   "nodes": [
                       {
                           "host": "192.168.12.1",
                           "port": 80000,
                           "weight": 1
                       }
                   ],
                   "timeout": {
                       "connect": 6000,
                       "send": 6000,
                       "read": 6000
                   }
               },
               "id": "337063379434734478",
               "hosts": [
                   "api-gateway.test.com"
               ],
               "name": "UAT-GATEWAY-FRONT-ADMIN",
               "status": 1,
               "uris": [
                   "/admin/*"
               ],
               "create_time": 1610435029,
               "plugins": {
                   "proxy-rewrite": {
                       "disable": true,
                       "uri": "/admin"
                   }
               },
               "vars": {}
           },
           "key": "/uat-apisix/routes/337063379434734478"
       },
       "count": "1",
       "action": "get"
   }


----------------------------------------------------------------
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] [apisix] Yangzcy423911 commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Yangzcy423911 commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758655659


   Thanks!  I will sendmail connect you !


----------------------------------------------------------------
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] [apisix] github-actions[bot] commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-1010874668


   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.


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



[GitHub] [apisix] Yangzcy423911 commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Yangzcy423911 commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758442974


   Thank you !Because this service is quite special, please give me more advice
   
   


----------------------------------------------------------------
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] [apisix] Yangzcy423911 commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Yangzcy423911 commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758428763


   访问网关时相关日志/*匹配是正常
   [2021-01-12T14:06:31+08:00] api-gateway.test.com "GET /p__User__Login.6bd91363.async.js HTTP/1.1" 200 5474 0.001 "http://api-gateway.test.com/user/login?redirect=%2Fuser%2Flogin" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36" 192.168.12.1:81 200 0.000 "http://api-gateway.test.com"


----------------------------------------------------------------
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] [apisix] Yangzcy423911 commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Yangzcy423911 commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758430041


   访问/apisix/admin/* 时  网关的日志
   [2021-01-12T14:10:11+08:00] api-gateway.test.com "POST /apisix/admin/user/login HTTP/1.1" 401 614 0.000 "http://api-gateway.tetst.com/user/login?redirect=%2Fuser%2Flogin" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36" - - - "http://api-gateway.test.com"
   
   


----------------------------------------------------------------
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] [apisix] Yangzcy423911 commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Yangzcy423911 commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758360714


      location ^~ / {
                    try_files $uri $uri/ /index.html;
           }
         location /apisix/admin {
                    proxy_pass http://192.168.12.1:80000/apisix/admin;
           }
   
   How to create a gateway to realize the function of nginx
   
   
   


----------------------------------------------------------------
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] [apisix] Yangzcy423911 commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Yangzcy423911 commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758455420


   {
       "node": {
           "value": {
               "update_time": 1610435275,
               "methods": [
                   "GET",
                   "HEAD",
                   "POST",
                   "PUT",
                   "DELETE",
                   "OPTIONS",
                   "PATCH"
               ],
               "upstream": {
                   "pass_host": "pass",
                   "type": "roundrobin",
                   "nodes": [
                       {
                           "host": "192.168.12.1",
                           "port": 80000,
                           "weight": 1
                       }
                   ],
                   "timeout": {
                       "connect": 6000,
                       "send": 6000,
                       "read": 6000
                   }
               },
               "id": "337063379434734478",
               "hosts": [
                   "api-gateway.test.com"
               ],
               "name": "UAT-GATEWAY-FRONT-ADMIN",
               "status": 1,
               "uris": [
                   "/admin/*"
               ],
               "create_time": 1610435029,
               "plugins": {
                   "proxy-rewrite": {
                       "disable": true,
                       "uri": "/admin"
                   }
               },
               "vars": {}
           },
           "key": "/uat-apisix/routes/337063379434734478"
       },
       "count": "1",
       "action": "get"
   }
   
   
   
   not OK


----------------------------------------------------------------
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] [apisix] Yangzcy423911 commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Yangzcy423911 commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758426332


   # 匹配: /×开头的路由
   
   {
       "node": {
           "value": {
               "update_time": 1610428637,
               "methods": [
                   "GET",
                   "HEAD",
                   "POST",
                   "PUT",
                   "DELETE",
                   "OPTIONS",
                   "PATCH"
               ],
               "id": "337052655337603982",
               "hosts": [
                   "api-gateway.test.com"
               ],
               "name": "UAT-GATEWAY-FRONT",
               "status": 1,
               "uris": [
                   "/*"
               ],
               "create_time": 1610428637,
               "upstream_id": "336935451669562254",
               "vars": {}
           },
           "key": "/uat-apisix/routes/337052655337603982"
       },
       "count": "1",
       "action": "get"
   }


----------------------------------------------------------------
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] [apisix] Firstsawyou commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-758452955


   If there is no uri rewriting, it can be achieved by configuring the route. 
   Example:
   
   ```shell
   curl http://127.0.0.1:9080/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "methods": ["GET"],
       "uri": "/admin/*",    
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "192.168.12.1:80000": 1
           }
       }
   }'
   ```
   
   You can look at this document:[https://github.com/apache/apisix/blob/master/doc/architecture-design.md#route ](https://github.com/apache/apisix/blob/master/doc/architecture-design.md#route)


----------------------------------------------------------------
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] [apisix] github-actions[bot] commented on issue #3252: request help: apisix proxy_rewrite to upstream

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #3252:
URL: https://github.com/apache/apisix/issues/3252#issuecomment-1002516695


   This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


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