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/04/12 14:45:53 UTC

[GitHub] [apisix-dashboard] totemofwolf opened a new issue #1759: default login page return 404 when using APISIX for http/https proxy

totemofwolf opened a new issue #1759:
URL: https://github.com/apache/apisix-dashboard/issues/1759


   ## Issue description
   <!-- A clear and concise description of what the issue is. -->
   
   ## Expected behavior
   <!-- A clear and concise description of what you expected to happen. -->
   
   ## How to Reproduce
   
   1. add route in APISIX
   
   ```
   {
     "uris": [
       "/*"
     ],
     "name": "apisix_proxy_dashboard",
     "upstream": {
       "nodes": [
         {
           "host": "127.0.0.1",
           "port": 9000,
           "weight": 1
         }
       ],
       "type": "roundrobin"
     },
     "status": 1
   }
   ```
   
   OR
   
   ```
   # route
   {
     "uris": [
       "/*"
     ],
     "name": "https_pilot",
     "desc": "https://pilot.x.info",
     "priority": 10,
     "hosts": [
       "pilot.x.info"
     ],
     "upstream_id": "349271367952106974",
     "status": 1
   }
   
   # upstream
   {
     "nodes": [
       {
         "host": "127.0.0.1",
         "port": 9000,
         "weight": 10
       }
     ],
     "timeout": {
       "connect": 6000,
       "read": 60000,
       "send": 60000
     },
     "type": "roundrobin",
     "pass_host": "pass",
     "name": "apisix manager api",
     "desc": "apisix manager api"
   }
   ```
   
   2. Access this route via ip or:
   https://pilot.x.info/user/login?redirect=%2F
   
   3. Input user && password, press login
   4. See error
   
   ## Screenshots
   
   ![image](https://user-images.githubusercontent.com/1818214/114413173-52db1080-9be0-11eb-8122-16ffc32d83f0.png)
   
   Left: Access dashboard via APISIX,
   Right: Direct access dashboard via `http://ip:9000`
   
   ## Environment
   
   * apisix version (cmd: `apisix version`): apisix:2.4-alpine
   * OS (cmd: `uname -a`): CentOS 7 ( dashboard 2.5 rpm)
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): apisix:2.4-alpine bundled openresty
   * etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API): 3.4.15
   * apisix-dashboard version, if have: 2.5
   * Browser version, if have: Chrome  88.0.4324.104
   
   ## Additional context
   


-- 
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-dashboard] totemofwolf closed issue #1759: default login page return 404 when using APISIX for http/https proxy

Posted by GitBox <gi...@apache.org>.
totemofwolf closed issue #1759:
URL: https://github.com/apache/apisix-dashboard/issues/1759


   


-- 
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-dashboard] Firstsawyou commented on issue #1759: default login page return 404 when using APISIX for http/https proxy

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


   Access Dashboard through APISIX proxy, 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
   ```
   
   


-- 
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-dashboard] totemofwolf commented on issue #1759: default login page return 404 when using APISIX for http/https proxy

Posted by GitBox <gi...@apache.org>.
totemofwolf commented on issue #1759:
URL: https://github.com/apache/apisix-dashboard/issues/1759#issuecomment-817891356


   > Access Dashboard through APISIX proxy, 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
   > ```
   
   It works. I am wondering why should this happen...? Port conflict or?
   
   
   ```
   +++ b /conf/apisix/2.4/config.yaml
   @@ -1,6 +1,7 @@
    apisix:
      node_listen: 80              # APISIX listening port
      enable_ipv6: false
   +  port_admin: 9180
   
   ```


-- 
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-dashboard] Firstsawyou commented on issue #1759: default login page return 404 when using APISIX for http/https proxy

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


   > It works. I am wondering why should this happen...? Port conflict or?
   
   Because Dashboard access needs to occupy the port of `/apisix/admin/xxx`, when using APISIX proxy to access Dashboard, it will conflict with APISIX's `Admin API` listening interface. Therefore, we need to customize the Admin API port to avoid conflicts, or disable the Admin API.


-- 
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-dashboard] Firstsawyou edited a comment on issue #1759: default login page return 404 when using APISIX for http/https proxy

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


   > It works. I am wondering why should this happen...? Port conflict or?
   
   Because Dashboard access needs to occupy the port of `/apisix/admin/xxx`, and on the data side, the default APISIX and `Admin API` listening ports are the same. When using APISIX proxy to access Dashboard, it will conflict with APISIX's `Admin API` listening interface. Therefore, we need to customize the Admin API port to avoid conflicts, or disable the Admin API.


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