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/03/15 09:02:03 UTC

[GitHub] [apisix] Firstsawyou opened a new pull request #3828: docs: added access to Dashboard through APISIX proxy in FAQ

Firstsawyou opened a new pull request #3828:
URL: https://github.com/apache/apisix/pull/3828


   ### What this PR does / why we need it:
   <!--- Why is this change required? What problem does it solve? -->
   <!--- If it fixes an open issue, please link to the issue here. -->
   
   close #3658
   
   ### Pre-submission checklist:
   
   * [x] Did you explain what problem does this PR solve? Or what new features have been added?
   * [ ] Have you added corresponding test cases?
   * [x] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
   


----------------------------------------------------------------
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 a change in pull request #3828: docs: added access to Dashboard through APISIX proxy in FAQ

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on a change in pull request #3828:
URL: https://github.com/apache/apisix/pull/3828#discussion_r594424968



##########
File path: docs/en/latest/FAQ.md
##########
@@ -371,3 +371,34 @@ You may have to install OPENSSL in your system and/or pass OPENSSL_DIR or OPENSS
 Example: luarocks install luasec OPENSSL_DIR=/usr/local
 make: *** [deps] Error 1
 ```
+
+## How to access APISIX Dashboard through APISIX proxy
+
+1. Keep APISIX and Admin API using different ports (or disable Admin API), for example, do the following configuration in `conf/config.yaml`.

Review comment:
       updated.




----------------------------------------------------------------
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] tokers commented on a change in pull request #3828: docs: added access to Dashboard through APISIX proxy in FAQ

Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #3828:
URL: https://github.com/apache/apisix/pull/3828#discussion_r594291484



##########
File path: docs/zh/latest/FAQ.md
##########
@@ -319,3 +319,34 @@ You may have to install OPENSSL in your system and/or pass OPENSSL_DIR or OPENSS
 Example: luarocks install luasec OPENSSL_DIR=/usr/local
 make: *** [deps] Error 1
 ```
+
+## 如何通过 APISIX 代理访问 APISIX Dashboard
+
+1、保持 APISIX 与 Admin API 使用不同的端口(或禁用 Admin API),例如,在 `conf/config.yaml` 中做如下配置。

Review comment:
       Ditto with the English version.

##########
File path: docs/zh/latest/FAQ.md
##########
@@ -319,3 +319,34 @@ You may have to install OPENSSL in your system and/or pass OPENSSL_DIR or OPENSS
 Example: luarocks install luasec OPENSSL_DIR=/usr/local
 make: *** [deps] Error 1
 ```
+
+## 如何通过 APISIX 代理访问 APISIX Dashboard
+
+1、保持 APISIX 与 Admin API 使用不同的端口(或禁用 Admin API),例如,在 `conf/config.yaml` 中做如下配置。
+
+Admin API 使用独立端口 9180:
+
+```yaml
+apisix:
+  port_admin: 9180            # use a separate port
+```
+
+2、添加 APISIX Dashboard 的代理路由:
+
+```shell
+curl -i http://127.0.0.1:9180/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "uris":[ "/*" ],
+    "name":"apisix_proxy_dashboard",
+    "upstream":{
+        "nodes":[
+            {
+                "host":"127.0.0.1",

Review comment:
       Ditto with the English version.

##########
File path: docs/en/latest/FAQ.md
##########
@@ -371,3 +371,34 @@ You may have to install OPENSSL in your system and/or pass OPENSSL_DIR or OPENSS
 Example: luarocks install luasec OPENSSL_DIR=/usr/local
 make: *** [deps] Error 1
 ```
+
+## How to access APISIX Dashboard through APISIX proxy
+
+1. Keep APISIX and Admin API using different ports (or disable Admin API), for example, do the following configuration in `conf/config.yaml`.
+
+The Admin API use a separate port 9180:
+
+```yaml
+apisix:
+  port_admin: 9180            # use a separate port
+```
+
+2. Add proxy route of APISIX Dashboard:
+
+```shell
+curl -i http://127.0.0.1:9180/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "uris":[ "/*" ],
+    "name":"apisix_proxy_dashboard",
+    "upstream":{
+        "nodes":[
+            {
+                "host":"127.0.0.1",

Review comment:
       Should add a note to tell the user that assuming we have a Dashboard service listening on `127.0.0.1:9000`.

##########
File path: docs/en/latest/FAQ.md
##########
@@ -371,3 +371,34 @@ You may have to install OPENSSL in your system and/or pass OPENSSL_DIR or OPENSS
 Example: luarocks install luasec OPENSSL_DIR=/usr/local
 make: *** [deps] Error 1
 ```
+
+## How to access APISIX Dashboard through APISIX proxy
+
+1. Keep APISIX and Admin API using different ports (or disable Admin API), for example, do the following configuration in `conf/config.yaml`.

Review comment:
       I think `APISIX` and `Admin API` do not peer to peer, should be "Keep the proxy port and Admin API port of APISIX different".




----------------------------------------------------------------
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 a change in pull request #3828: docs: added access to Dashboard through APISIX proxy in FAQ

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on a change in pull request #3828:
URL: https://github.com/apache/apisix/pull/3828#discussion_r594480681



##########
File path: docs/en/latest/FAQ.md
##########
@@ -371,3 +371,36 @@ You may have to install OPENSSL in your system and/or pass OPENSSL_DIR or OPENSS
 Example: luarocks install luasec OPENSSL_DIR=/usr/local
 make: *** [deps] Error 1
 ```
+
+## How to access APISIX Dashboard through APISIX proxy
+
+1. Keep the APISIX proxy port and Admin API port different(or disable Admin API). For example, do the following configuration in `conf/config.yaml`.
+
+The Admin API use a separate port 9180:
+
+```yaml
+apisix:
+  port_admin: 9180            # use a separate port
+```
+
+2. Add proxy route of APISIX Dashboard:
+
+Note: The APISIX Dashboard service here is listening on `127.0.0.1:9000`.
+
+```shell
+curl -i http://127.0.0.1:9180/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "uris":[ "/*" ],

Review comment:
       For non-existent uri, it will match "/*". If the uri has been configured, it will not be affected. For example, if the uri of a certain route is `/hello*`, then all requests prefixed with `/hello` will match `/hello*` instead of `/*`. Therefore, this will not affect other existing routes.




----------------------------------------------------------------
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] juzhiyuan commented on a change in pull request #3828: docs: added access to Dashboard through APISIX proxy in FAQ

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #3828:
URL: https://github.com/apache/apisix/pull/3828#discussion_r594428198



##########
File path: docs/en/latest/FAQ.md
##########
@@ -371,3 +371,36 @@ You may have to install OPENSSL in your system and/or pass OPENSSL_DIR or OPENSS
 Example: luarocks install luasec OPENSSL_DIR=/usr/local
 make: *** [deps] Error 1
 ```
+
+## How to access APISIX Dashboard through APISIX proxy
+
+1. Keep the APISIX proxy port and Admin API port different(or disable Admin API). For example, do the following configuration in `conf/config.yaml`.
+
+The Admin API use a separate port 9180:
+
+```yaml
+apisix:
+  port_admin: 9180            # use a separate port
+```
+
+2. Add proxy route of APISIX Dashboard:
+
+Note: The APISIX Dashboard service here is listening on `127.0.0.1:9000`.
+
+```shell
+curl -i http://127.0.0.1:9180/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "uris":[ "/*" ],

Review comment:
       Does this mean all uris will match this route? will this affect other routes?




----------------------------------------------------------------
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 a change in pull request #3828: docs: added access to Dashboard through APISIX proxy in FAQ

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on a change in pull request #3828:
URL: https://github.com/apache/apisix/pull/3828#discussion_r594425093



##########
File path: docs/en/latest/FAQ.md
##########
@@ -371,3 +371,34 @@ You may have to install OPENSSL in your system and/or pass OPENSSL_DIR or OPENSS
 Example: luarocks install luasec OPENSSL_DIR=/usr/local
 make: *** [deps] Error 1
 ```
+
+## How to access APISIX Dashboard through APISIX proxy
+
+1. Keep APISIX and Admin API using different ports (or disable Admin API), for example, do the following configuration in `conf/config.yaml`.
+
+The Admin API use a separate port 9180:
+
+```yaml
+apisix:
+  port_admin: 9180            # use a separate port
+```
+
+2. Add proxy route of APISIX Dashboard:
+
+```shell
+curl -i http://127.0.0.1:9180/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "uris":[ "/*" ],
+    "name":"apisix_proxy_dashboard",
+    "upstream":{
+        "nodes":[
+            {
+                "host":"127.0.0.1",

Review comment:
       updated.




----------------------------------------------------------------
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 merged pull request #3828: docs: added access to Dashboard through APISIX proxy in FAQ

Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #3828:
URL: https://github.com/apache/apisix/pull/3828


   


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