You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apisix.apache.org by 奔波虫 <25...@qq.com> on 2020/03/06 04:03:55 UTC
configure a location
Dear all,
I want to ask a question.
How to configure the location:
location /beamer/ {
rewrite ^/beamer/(.*)$ /$1 break;
proxy_pass http://127.0.0.1:3080/;
}
yours,
Ben
Re: configure a location
Posted by YuanSheng Wang <me...@apache.org>.
On Fri, Mar 6, 2020 at 12:07 PM YuanSheng Wang <me...@apache.org> wrote:
>
> I want to ask a question.
>
> How to configure this `location` by APISIX way?
You can take a look at this plugin example first:
https://github.com/apache/incubator-apisix/blob/master/doc/plugins/proxy-rewrite.md#how-to-enable
It should be like this:
curl http://127.0.0.1:9080/apisix/admin/routes/1 \
-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"uri": "/beamer/*",
"plugins": {
"proxy-rewrite": {
"regex_uri": [" ^/beamer/(.*)", "/$1"]
}
},
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:3080": 1
}
}
}'
>
>
> location /beamer/ {
> rewrite ^/beamer/(.*)$ /$1 break;
> proxy_pass http://127.0.0.1:3080/;
> }
>
>
> yours,
> Ben
>
> On Fri, Mar 6, 2020 at 12:04 PM 奔波虫 <25...@qq.com> wrote:
> >
> > Dear all,
> >
> >
> > I want to ask a question.
> >
> >
> > How to configure the location:
> >
> >
> > location /beamer/ {
> > rewrite ^/beamer/(.*)$ /$1 break;
> > proxy_pass http://127.0.0.1:3080/;
> > }
> >
> >
> >
> >
> >
> > yours,
> > Ben
>
>
>
> --
> MembPhis
> My github: https://github.com/membphis
> Apache APISIX: https://github.com/apache/incubator-apisix
--
MembPhis
My github: https://github.com/membphis
Apache APISIX: https://github.com/apache/incubator-apisix
Re: configure a location
Posted by YuanSheng Wang <me...@apache.org>.
I want to ask a question.
How to configure this `location` by APISIX way?
location /beamer/ {
rewrite ^/beamer/(.*)$ /$1 break;
proxy_pass http://127.0.0.1:3080/;
}
yours,
Ben
On Fri, Mar 6, 2020 at 12:04 PM 奔波虫 <25...@qq.com> wrote:
>
> Dear all,
>
>
> I want to ask a question.
>
>
> How to configure the location:
>
>
> location /beamer/ {
> rewrite ^/beamer/(.*)$ /$1 break;
> proxy_pass http://127.0.0.1:3080/;
> }
>
>
>
>
>
> yours,
> Ben
--
MembPhis
My github: https://github.com/membphis
Apache APISIX: https://github.com/apache/incubator-apisix