You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by Ram Chander <ra...@gmail.com> on 2015/08/28 14:11:51 UTC
Multiple sites in ATS
Hi,
I want multiple sites to be hosted in ATS similar nignx/apache.
For eg, ATS should listen on two different ports, each port having its
own origin server.
How can we achieve this ?
Any example would be helpful.
Thanks.
Regards,
Ram
Re: Multiple sites in ATS
Posted by Sudheer Vinukonda <su...@yahoo-inc.com>.
In general, all map directives map a source URL (typically, the client request URL) to a target URL. So, the below doesn't look right:
map_with_recv_port 80 http://localhost:8080/
map_with_recv_port 9090 http://localhost:8090/
Can you try this instead:
map_with_recv_port http://localhost:80/ http://localhost:8080/
map_with_recv_port http://localhost:9090/ http://localhost:8090/
Also, AFAIK, <map> and <map_with_recv_port> should be identical, unless you have an intermediate layer (e.g SLB) changing the incoming port on ATS. So, if you don't have such a use case, you might as well just use <map>.
Thanks,
Sudheer
On Friday, August 28, 2015 7:07 AM, Ram Chander <ra...@gmail.com> wrote:
Can I know the syntax for "map_with_recv_port" ? Below is the log/error
$ curl http://10.65.71.33/a.html -> Not Found on Accelerator
log -> ERR_CONNECT_FAIL 0 000 [28/Aug/2015:19:33:59 +0530] "GET a.html"
This works fine - map / http://localhost:8080/
On Fri, Aug 28, 2015 at 7:29 PM, Jason Strongman <ja...@gmail.com> wrote:
Can you provide curl and/or log output ?
On Fri, Aug 28, 2015 at 8:34 AM, Ram Chander <ra...@gmail.com> wrote:
> Yes it listening on both ports. I couldnt get "map_with_recv_port "
> working correctly.
>
> On Fri, Aug 28, 2015 at 7:03 PM, Jason Strongman
> <ja...@gmail.com> wrote:
>>
>> is ATS actually listening on those ports ?
>>
>> https://docs.trafficserver.apache.org/records.config
>> proxy.config.http.server_ports
>>
>> On Fri, Aug 28, 2015 at 8:19 AM, Ram Chander <ra...@gmail.com> wrote:
>> >
>> > I tried below in remap.config but its not working
>> >
>> > map_with_recv_port 80 http://localhost:8080/
>> >
>> > map_with_recv_port 9090 http://localhost:8090/
>> >
>> >
>> >
>> >
>> > On Fri, Aug 28, 2015 at 5:41 PM, Ram Chander <ra...@gmail.com> wrote:
>> >>
>> >> Hi,
>> >>
>> >> I want multiple sites to be hosted in ATS similar nignx/apache.
>> >> For eg, ATS should listen on two different ports, each port having its
>> >> own origin server.
>> >>
>> >> How can we achieve this ?
>> >> Any example would be helpful.
>> >>
>> >> Thanks.
>> >>
>> >> Regards,
>> >> Ram
>> >>
>> >>
>> >
>
>
Re: Multiple sites in ATS
Posted by Ram Chander <ra...@gmail.com>.
Can I know the syntax for "map_with_recv_port" ? Below is the log/error
$ curl http://10.65.71.33/a.html -> Not Found on Accelerator
log -> ERR_CONNECT_FAIL 0 000 [28/Aug/2015:19:33:59 +0530] "GET a.html"
This works fine - map / http://localhost:8080/
On Fri, Aug 28, 2015 at 7:29 PM, Jason Strongman <
jasonstrongman2016@gmail.com> wrote:
> Can you provide curl and/or log output ?
>
> On Fri, Aug 28, 2015 at 8:34 AM, Ram Chander <ra...@gmail.com> wrote:
> > Yes it listening on both ports. I couldnt get "map_with_recv_port "
> > working correctly.
> >
> > On Fri, Aug 28, 2015 at 7:03 PM, Jason Strongman
> > <ja...@gmail.com> wrote:
> >>
> >> is ATS actually listening on those ports ?
> >>
> >> https://docs.trafficserver.apache.org/records.config
> >> proxy.config.http.server_ports
> >>
> >> On Fri, Aug 28, 2015 at 8:19 AM, Ram Chander <ra...@gmail.com>
> wrote:
> >> >
> >> > I tried below in remap.config but its not working
> >> >
> >> > map_with_recv_port 80 http://localhost:8080/
> >> >
> >> > map_with_recv_port 9090 http://localhost:8090/
> >> >
> >> >
> >> >
> >> >
> >> > On Fri, Aug 28, 2015 at 5:41 PM, Ram Chander <ra...@gmail.com>
> wrote:
> >> >>
> >> >> Hi,
> >> >>
> >> >> I want multiple sites to be hosted in ATS similar nignx/apache.
> >> >> For eg, ATS should listen on two different ports, each port having
> its
> >> >> own origin server.
> >> >>
> >> >> How can we achieve this ?
> >> >> Any example would be helpful.
> >> >>
> >> >> Thanks.
> >> >>
> >> >> Regards,
> >> >> Ram
> >> >>
> >> >>
> >> >
> >
> >
>
Re: Multiple sites in ATS
Posted by Jason Strongman <ja...@gmail.com>.
Can you provide curl and/or log output ?
On Fri, Aug 28, 2015 at 8:34 AM, Ram Chander <ra...@gmail.com> wrote:
> Yes it listening on both ports. I couldnt get "map_with_recv_port "
> working correctly.
>
> On Fri, Aug 28, 2015 at 7:03 PM, Jason Strongman
> <ja...@gmail.com> wrote:
>>
>> is ATS actually listening on those ports ?
>>
>> https://docs.trafficserver.apache.org/records.config
>> proxy.config.http.server_ports
>>
>> On Fri, Aug 28, 2015 at 8:19 AM, Ram Chander <ra...@gmail.com> wrote:
>> >
>> > I tried below in remap.config but its not working
>> >
>> > map_with_recv_port 80 http://localhost:8080/
>> >
>> > map_with_recv_port 9090 http://localhost:8090/
>> >
>> >
>> >
>> >
>> > On Fri, Aug 28, 2015 at 5:41 PM, Ram Chander <ra...@gmail.com> wrote:
>> >>
>> >> Hi,
>> >>
>> >> I want multiple sites to be hosted in ATS similar nignx/apache.
>> >> For eg, ATS should listen on two different ports, each port having its
>> >> own origin server.
>> >>
>> >> How can we achieve this ?
>> >> Any example would be helpful.
>> >>
>> >> Thanks.
>> >>
>> >> Regards,
>> >> Ram
>> >>
>> >>
>> >
>
>
Re: Multiple sites in ATS
Posted by Ram Chander <ra...@gmail.com>.
Yes it listening on both ports. I couldnt get "map_with_recv_port "
working correctly.
On Fri, Aug 28, 2015 at 7:03 PM, Jason Strongman <
jasonstrongman2016@gmail.com> wrote:
> is ATS actually listening on those ports ?
>
> https://docs.trafficserver.apache.org/records.config
> proxy.config.http.server_ports
>
> On Fri, Aug 28, 2015 at 8:19 AM, Ram Chander <ra...@gmail.com> wrote:
> >
> > I tried below in remap.config but its not working
> >
> > map_with_recv_port 80 http://localhost:8080/
> >
> > map_with_recv_port 9090 http://localhost:8090/
> >
> >
> >
> >
> > On Fri, Aug 28, 2015 at 5:41 PM, Ram Chander <ra...@gmail.com> wrote:
> >>
> >> Hi,
> >>
> >> I want multiple sites to be hosted in ATS similar nignx/apache.
> >> For eg, ATS should listen on two different ports, each port having its
> >> own origin server.
> >>
> >> How can we achieve this ?
> >> Any example would be helpful.
> >>
> >> Thanks.
> >>
> >> Regards,
> >> Ram
> >>
> >>
> >
>
Re: Multiple sites in ATS
Posted by Jason Strongman <ja...@gmail.com>.
is ATS actually listening on those ports ?
https://docs.trafficserver.apache.org/records.config
proxy.config.http.server_ports
On Fri, Aug 28, 2015 at 8:19 AM, Ram Chander <ra...@gmail.com> wrote:
>
> I tried below in remap.config but its not working
>
> map_with_recv_port 80 http://localhost:8080/
>
> map_with_recv_port 9090 http://localhost:8090/
>
>
>
>
> On Fri, Aug 28, 2015 at 5:41 PM, Ram Chander <ra...@gmail.com> wrote:
>>
>> Hi,
>>
>> I want multiple sites to be hosted in ATS similar nignx/apache.
>> For eg, ATS should listen on two different ports, each port having its
>> own origin server.
>>
>> How can we achieve this ?
>> Any example would be helpful.
>>
>> Thanks.
>>
>> Regards,
>> Ram
>>
>>
>
Re: Multiple sites in ATS
Posted by Ram Chander <ra...@gmail.com>.
I tried below in remap.config but its not working
map_with_recv_port 80 http://localhost:8080/
map_with_recv_port 9090 http://localhost:8090/
On Fri, Aug 28, 2015 at 5:41 PM, Ram Chander <ra...@gmail.com> wrote:
> Hi,
>
> I want multiple sites to be hosted in ATS similar nignx/apache.
> For eg, ATS should listen on two different ports, each port having its
> own origin server.
>
> How can we achieve this ?
> Any example would be helpful.
>
> Thanks.
>
> Regards,
> Ram
>
>
>