apisix icon indicating copy to clipboard operation
apisix copied to clipboard

request help: how apisix proxy to static files

Open TigerGxl opened this issue 6 years ago • 1 comments

Issue description

Environment

  • apisix version (cmd: apisix version): 1.5 (by luarocks)
  • OS:Ubuntu 16.04.6

apisix is great to loads api service, now i want to proxy to static file like html without nginx.

this is my conf in etcd image

What I want to do is when i request "http://demo.apisix.com", apisix loads to "/home/demo80/index.html", run javascript in the html, and now , if i request "http://demo.apisix.com/v1", apisix loads to my backend "172.16.43.216:5000" and return 404, it's not working,What should I do right?

TigerGxl avatar Aug 13 '20 09:08 TigerGxl

you can use another Nginx server to provide the static files.

client -> apisix -> nginx(static file) client -> apisix -> upstream

create two routes for this case, then it will work fine.

membphis avatar Aug 13 '20 11:08 membphis