You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apisix.apache.org by Zhang Qiang <do...@gmail.com> on 2020/04/10 10:26:43 UTC

Question: how to server static files

Hi team,

Is there a recommended way to server static files with apisix? We are
migrating our nginx configurations to apisix and found it hard to server
static files.

I think implementing a plugin by our own is difficult since caching is a
concern and it's hard to do it right.

Don't know if this is the right group to ask questions, sorry if it is not.

Re: Question: how to server static files

Posted by Ming Wen <we...@apache.org>.
Hi, Qiang,
This is definitely the right place to ask questions about Apache APISIX :)

For your question, if static file is from upstream , you can use the
proxy-cache plugin;
if it's a local static file, you'll need to modify `bin/apisix` to add
nginx configuration

Thanks,
Ming Wen, Apache APISIX & Apache SkyWalking
Twitter: _WenMing


Zhang Qiang <do...@gmail.com> 于2020年4月10日周五 下午6:26写道:

> Hi team,
>
> Is there a recommended way to server static files with apisix? We are
> migrating our nginx configurations to apisix and found it hard to server
> static files.
>
> I think implementing a plugin by our own is difficult since caching is a
> concern and it's hard to do it right.
>
> Don't know if this is the right group to ask questions, sorry if it is not.
>

Re: Question: how to server static files

Posted by YuanSheng Wang <me...@apache.org>.
you can change the bin/apisix[1] file, add your static file configuration.

[1] https://github.com/apache/incubator-apisix/blob/master/bin/apisix#L84

On Fri, Apr 10, 2020 at 6:26 PM Zhang Qiang <do...@gmail.com> wrote:

> Hi team,
>
> Is there a recommended way to server static files with apisix? We are
> migrating our nginx configurations to apisix and found it hard to server
> static files.
>
> I think implementing a plugin by our own is difficult since caching is a
> concern and it's hard to do it right.
>
> Don't know if this is the right group to ask questions, sorry if it is not.
>


-- 
*MembPhis*
My github: https://github.com/membphis
Apache APISIX: https://github.com/apache/incubator-apisix