You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by "adi.siswanto" <ad...@indosatm2.com> on 2012/08/09 16:42:52 UTC

subdomain

dear all,
i use apache to rewrite subdomain rule from foo.bar.com which is exactly
call from folder bar.com/foo and it's running well.

And I try to put ATS in front of this system. But I can not make it
happened because every time I call foo.bar.com it always send me to
bar.com
Any suggestion please ?

regards 

Gunakan I-Pay untuk pembelian voucher game online, digital content, full-track dan lainnnya. Topup I-pay dapat menggunakan Transfer bank ,internet banking. Info lengkap I-Pay klik https://ipay.indosatm2.com/

Disclaimer

This is an e-mail from PT Indosat Mega Media intended solely for the named addresse(s). It is confidential and may contain legally privileged information. Therefore, any unauthorized use, disclosure or copying of this information is strictly prohibited. 
PT Indosat Mega Media does not accept liability for any email loss or files damage.

Re: subdomain

Posted by "adi.siswanto" <ad...@indosatm2.com>.
Hi Leif, I have tried with that position, but still same result

On Wed, 2012-08-15 at 07:40 -0700, Leif Hedstrom wrote:
> On 8/14/12 9:19 PM, adi.siswanto wrote:
> > sorry, question again, I found weird habit
> > after using ATS :
> > - map foo.bar.com --> bar.com/foo	--> OK
> > - map xyz.com	--> foo.bar.com		--> OK
> >
> > but when I access xyz.com/abc it won't go to bar.com/foo/abc, but
> > it's always going to xyz.com/foo/abc. Any suggestion how to solve it?
> >
> > my remap.conf (where x.x.x.x is bar.com)
> > map / http://x.x.x.x:8001
> > map xyz.com	http://x.x.x.x:8001/foo
> 
> The map / rule has to come last. First match wins, / matches everything.
> 
> -- leif
> 


Gunakan I-Pay untuk pembelian voucher game online, digital content, full-track dan lainnnya. Topup I-pay dapat menggunakan Transfer bank ,internet banking. Info lengkap I-Pay klik https://ipay.indosatm2.com/

Disclaimer

This is an e-mail from PT Indosat Mega Media intended solely for the named addresse(s). It is confidential and may contain legally privileged information. Therefore, any unauthorized use, disclosure or copying of this information is strictly prohibited. 
PT Indosat Mega Media does not accept liability for any email loss or files damage.

Re: subdomain

Posted by "adi.siswanto" <ad...@indosatm2.com>.
it's OK when I called http://bar.com/foo/abc, it's shown normal.
Only problem if I called from http://foo.bar.com/abc (even
http://foo.bar.com is also OK as I wish)

On Wed, 2012-08-15 at 17:45 +0200, Reindl Harald wrote:
> what happens if you call the exact URL directly on the origin server?
> 
> if the origin or the app make any redirect-headers trafficserver is
> as proxy not responsible for this
> 
> Am 15.08.2012 17:40, schrieb adi.siswanto:
> > everytime I access xyz.com/abc, the browser auto redirect to
> > xyz.com/foo/abc, but in the error message mention like this
> > 
> > Not Found
> > The requested URL /foo/foo/abv/ was not found on this server.
> > 
> > is this from my php apps or could be solve from ATS setting ?
> > 
> > rgds
> > 
> > On Wed, 2012-08-15 at 07:40 -0700, Leif Hedstrom wrote:
> >> On 8/14/12 9:19 PM, adi.siswanto wrote:
> >>> sorry, question again, I found weird habit
> >>> after using ATS :
> >>> - map foo.bar.com --> bar.com/foo	--> OK
> >>> - map xyz.com	--> foo.bar.com		--> OK
> >>>
> >>> but when I access xyz.com/abc it won't go to bar.com/foo/abc, but
> >>> it's always going to xyz.com/foo/abc. Any suggestion how to solve it?
> >>>
> >>> my remap.conf (where x.x.x.x is bar.com)
> >>> map / http://x.x.x.x:8001
> >>> map xyz.com	http://x.x.x.x:8001/foo
> >>
> >> The map / rule has to come last. First match wins, / matches everything.
> >>
> >> -- leif
> >>
> > 
> > 
> > Gunakan I-Pay untuk pembelian voucher game online, digital content, full-track dan lainnnya. Topup I-pay dapat menggunakan Transfer bank ,internet banking. Info lengkap I-Pay klik https://ipay.indosatm2.com/
> > 
> > Disclaimer
> > 
> > This is an e-mail from PT Indosat Mega Media intended solely for the named addresse(s). It is confidential and may contain legally privileged information. Therefore, any unauthorized use, disclosure or copying of this information is strictly prohibited. 
> > PT Indosat Mega Media does not accept liability for any email loss or files damage.
> > 
> 


Gunakan I-Pay untuk pembelian voucher game online, digital content, full-track dan lainnnya. Topup I-pay dapat menggunakan Transfer bank ,internet banking. Info lengkap I-Pay klik https://ipay.indosatm2.com/

Disclaimer

This is an e-mail from PT Indosat Mega Media intended solely for the named addresse(s). It is confidential and may contain legally privileged information. Therefore, any unauthorized use, disclosure or copying of this information is strictly prohibited. 
PT Indosat Mega Media does not accept liability for any email loss or files damage.

Re: subdomain

Posted by Reindl Harald <h....@thelounge.net>.
what happens if you call the exact URL directly on the origin server?

if the origin or the app make any redirect-headers trafficserver is
as proxy not responsible for this

Am 15.08.2012 17:40, schrieb adi.siswanto:
> everytime I access xyz.com/abc, the browser auto redirect to
> xyz.com/foo/abc, but in the error message mention like this
> 
> Not Found
> The requested URL /foo/foo/abv/ was not found on this server.
> 
> is this from my php apps or could be solve from ATS setting ?
> 
> rgds
> 
> On Wed, 2012-08-15 at 07:40 -0700, Leif Hedstrom wrote:
>> On 8/14/12 9:19 PM, adi.siswanto wrote:
>>> sorry, question again, I found weird habit
>>> after using ATS :
>>> - map foo.bar.com --> bar.com/foo	--> OK
>>> - map xyz.com	--> foo.bar.com		--> OK
>>>
>>> but when I access xyz.com/abc it won't go to bar.com/foo/abc, but
>>> it's always going to xyz.com/foo/abc. Any suggestion how to solve it?
>>>
>>> my remap.conf (where x.x.x.x is bar.com)
>>> map / http://x.x.x.x:8001
>>> map xyz.com	http://x.x.x.x:8001/foo
>>
>> The map / rule has to come last. First match wins, / matches everything.
>>
>> -- leif
>>
> 
> 
> Gunakan I-Pay untuk pembelian voucher game online, digital content, full-track dan lainnnya. Topup I-pay dapat menggunakan Transfer bank ,internet banking. Info lengkap I-Pay klik https://ipay.indosatm2.com/
> 
> Disclaimer
> 
> This is an e-mail from PT Indosat Mega Media intended solely for the named addresse(s). It is confidential and may contain legally privileged information. Therefore, any unauthorized use, disclosure or copying of this information is strictly prohibited. 
> PT Indosat Mega Media does not accept liability for any email loss or files damage.
> 

-- 

Reindl Harald
the lounge interactive design GmbH
A-1060 Vienna, Hofmühlgasse 17
CTO / CISO / Software-Development
p: +43 (1) 595 3999 33, m: +43 (676) 40 221 40
icq: 154546673, http://www.thelounge.net/

http://www.thelounge.net/signature.asc.what.htm


Re: subdomain

Posted by "adi.siswanto" <ad...@indosatm2.com>.
everytime I access xyz.com/abc, the browser auto redirect to
xyz.com/foo/abc, but in the error message mention like this

Not Found
The requested URL /foo/foo/abv/ was not found on this server.

is this from my php apps or could be solve from ATS setting ?

rgds

On Wed, 2012-08-15 at 07:40 -0700, Leif Hedstrom wrote:
> On 8/14/12 9:19 PM, adi.siswanto wrote:
> > sorry, question again, I found weird habit
> > after using ATS :
> > - map foo.bar.com --> bar.com/foo	--> OK
> > - map xyz.com	--> foo.bar.com		--> OK
> >
> > but when I access xyz.com/abc it won't go to bar.com/foo/abc, but
> > it's always going to xyz.com/foo/abc. Any suggestion how to solve it?
> >
> > my remap.conf (where x.x.x.x is bar.com)
> > map / http://x.x.x.x:8001
> > map xyz.com	http://x.x.x.x:8001/foo
> 
> The map / rule has to come last. First match wins, / matches everything.
> 
> -- leif
> 


Gunakan I-Pay untuk pembelian voucher game online, digital content, full-track dan lainnnya. Topup I-pay dapat menggunakan Transfer bank ,internet banking. Info lengkap I-Pay klik https://ipay.indosatm2.com/

Disclaimer

This is an e-mail from PT Indosat Mega Media intended solely for the named addresse(s). It is confidential and may contain legally privileged information. Therefore, any unauthorized use, disclosure or copying of this information is strictly prohibited. 
PT Indosat Mega Media does not accept liability for any email loss or files damage.

Re: subdomain

Posted by Leif Hedstrom <zw...@apache.org>.
On 8/14/12 9:19 PM, adi.siswanto wrote:
> sorry, question again, I found weird habit
> after using ATS :
> - map foo.bar.com --> bar.com/foo	--> OK
> - map xyz.com	--> foo.bar.com		--> OK
>
> but when I access xyz.com/abc it won't go to bar.com/foo/abc, but
> it's always going to xyz.com/foo/abc. Any suggestion how to solve it?
>
> my remap.conf (where x.x.x.x is bar.com)
> map / http://x.x.x.x:8001
> map xyz.com	http://x.x.x.x:8001/foo

The map / rule has to come last. First match wins, / matches everything.

-- leif


Re: subdomain

Posted by Reindl Harald <h....@thelounge.net>.
for trafficserver i am using a tiny webservice which
is parsing a via cronjob made copy of httpd-vhosts
and give back a php-serialized array for each origin
server which "ServerName" and "ServerAlias" are valid

with this infos i write the complete "remap.conf" and
and" hosts.dnsmasq" for dnsmasq and if there are changes
restarts trafficserver

see attached "trafficserver.txt" which is the
cron-php-script with obfuscated servernames/IP's

final goal is to decide simply with the DNS if a
domain is served directly by the origin-server or
going via reverse-proxy without need to care about
trafficservers configuration
_______________________________

this way traffic-server ends in mapping like below
and "/etc/hosts.dnsmasq" is the key to have on the
proxy a DNS on localhost pointing to the IP of
the origin server while the real DNS is not touched

map http://www.rhsoft.net http://www.rhsoft.net
reverse_map http://www.rhsoft.net http://www.rhsoft.net
_______________________________

Am 15.08.2012 06:19, schrieb adi.siswanto:
> sorry, question again, I found weird habit
> after using ATS :
> - map foo.bar.com --> bar.com/foo	--> OK
> - map xyz.com	--> foo.bar.com		--> OK
> 
> but when I access xyz.com/abc it won't go to bar.com/foo/abc, but
> it's always going to xyz.com/foo/abc. Any suggestion how to solve it?
> 
> my remap.conf (where x.x.x.x is bar.com)
> map / http://x.x.x.x:8001
> map xyz.com	http://x.x.x.x:8001/foo
> 
> regards
> 
> On Sat, 2012-08-11 at 13:39 +0700, adi.siswanto wrote:
>> thanks Leif, it works charmly with this
>> map /	 http://bar.com:8001/
>>
>> regards
>>
>> On Fri, 2012-08-10 at 14:02 -0600, Leif Hedstrom wrote:
>>> On 08/09/2012 09:02 AM, adi.siswanto wrote:
>>>> currently I only tried for
>>>> map  http://*.bar.com/	http://bar.com:8001/*
>>>> reverse_map http://bar.com:8001/* http://*.bar.com/
>>>>
>>>
>>> This is not valid syntax. Read the docs, or the example from the default 
>>> remap.config. And yes, if you really want to match on *.bar.com, you 
>>> should either use regex map, or map on the wildcard (/). E.g. the 
>>> following would probably do what you want (assuming you only have bar.com):
>>>
>>>      map / http://bar.com:8001
>>>
>>>
>>> -- leif
>>>
>>
>>
>> Gunakan I-Pay untuk pembelian voucher game online, digital content, full-track dan lainnnya. Topup I-pay dapat menggunakan Transfer bank ,internet banking. Info lengkap I-Pay klik https://ipay.indosatm2.com/
>>
>> Disclaimer
>>
>> This is an e-mail from PT Indosat Mega Media intended solely for the named addresse(s). It is confidential and may contain legally privileged information. Therefore, any unauthorized use, disclosure or copying of this information is strictly prohibited. 
>> PT Indosat Mega Media does not accept liability for any email loss or files damage.
> 
> 
> Gunakan I-Pay untuk pembelian voucher game online, digital content, full-track dan lainnnya. Topup I-pay dapat menggunakan Transfer bank ,internet banking. Info lengkap I-Pay klik https://ipay.indosatm2.com/
> 
> Disclaimer
> 
> This is an e-mail from PT Indosat Mega Media intended solely for the named addresse(s). It is confidential and may contain legally privileged information. Therefore, any unauthorized use, disclosure or copying of this information is strictly prohibited. 
> PT Indosat Mega Media does not accept liability for any email loss or files damage.
> 

-- 

Reindl Harald
the lounge interactive design GmbH
A-1060 Vienna, Hofmühlgasse 17
CTO / CISO / Software-Development
p: +43 (1) 595 3999 33, m: +43 (676) 40 221 40
icq: 154546673, http://www.thelounge.net/

http://www.thelounge.net/signature.asc.what.htm

Re: subdomain

Posted by "adi.siswanto" <ad...@indosatm2.com>.
sorry, question again, I found weird habit
after using ATS :
- map foo.bar.com --> bar.com/foo	--> OK
- map xyz.com	--> foo.bar.com		--> OK

but when I access xyz.com/abc it won't go to bar.com/foo/abc, but
it's always going to xyz.com/foo/abc. Any suggestion how to solve it?

my remap.conf (where x.x.x.x is bar.com)
map / http://x.x.x.x:8001
map xyz.com	http://x.x.x.x:8001/foo

regards

On Sat, 2012-08-11 at 13:39 +0700, adi.siswanto wrote:
> thanks Leif, it works charmly with this
> map /	 http://bar.com:8001/
> 
> regards
> 
> On Fri, 2012-08-10 at 14:02 -0600, Leif Hedstrom wrote:
> > On 08/09/2012 09:02 AM, adi.siswanto wrote:
> > > currently I only tried for
> > > map  http://*.bar.com/	http://bar.com:8001/*
> > > reverse_map http://bar.com:8001/* http://*.bar.com/
> > >
> > 
> > This is not valid syntax. Read the docs, or the example from the default 
> > remap.config. And yes, if you really want to match on *.bar.com, you 
> > should either use regex map, or map on the wildcard (/). E.g. the 
> > following would probably do what you want (assuming you only have bar.com):
> > 
> >      map / http://bar.com:8001
> > 
> > 
> > -- leif
> > 
> 
> 
> Gunakan I-Pay untuk pembelian voucher game online, digital content, full-track dan lainnnya. Topup I-pay dapat menggunakan Transfer bank ,internet banking. Info lengkap I-Pay klik https://ipay.indosatm2.com/
> 
> Disclaimer
> 
> This is an e-mail from PT Indosat Mega Media intended solely for the named addresse(s). It is confidential and may contain legally privileged information. Therefore, any unauthorized use, disclosure or copying of this information is strictly prohibited. 
> PT Indosat Mega Media does not accept liability for any email loss or files damage.


Gunakan I-Pay untuk pembelian voucher game online, digital content, full-track dan lainnnya. Topup I-pay dapat menggunakan Transfer bank ,internet banking. Info lengkap I-Pay klik https://ipay.indosatm2.com/

Disclaimer

This is an e-mail from PT Indosat Mega Media intended solely for the named addresse(s). It is confidential and may contain legally privileged information. Therefore, any unauthorized use, disclosure or copying of this information is strictly prohibited. 
PT Indosat Mega Media does not accept liability for any email loss or files damage.

Re: subdomain

Posted by "adi.siswanto" <ad...@indosatm2.com>.
thanks Leif, it works charmly with this
map /	 http://bar.com:8001/

regards

On Fri, 2012-08-10 at 14:02 -0600, Leif Hedstrom wrote:
> On 08/09/2012 09:02 AM, adi.siswanto wrote:
> > currently I only tried for
> > map  http://*.bar.com/	http://bar.com:8001/*
> > reverse_map http://bar.com:8001/* http://*.bar.com/
> >
> 
> This is not valid syntax. Read the docs, or the example from the default 
> remap.config. And yes, if you really want to match on *.bar.com, you 
> should either use regex map, or map on the wildcard (/). E.g. the 
> following would probably do what you want (assuming you only have bar.com):
> 
>      map / http://bar.com:8001
> 
> 
> -- leif
> 


Gunakan I-Pay untuk pembelian voucher game online, digital content, full-track dan lainnnya. Topup I-pay dapat menggunakan Transfer bank ,internet banking. Info lengkap I-Pay klik https://ipay.indosatm2.com/

Disclaimer

This is an e-mail from PT Indosat Mega Media intended solely for the named addresse(s). It is confidential and may contain legally privileged information. Therefore, any unauthorized use, disclosure or copying of this information is strictly prohibited. 
PT Indosat Mega Media does not accept liability for any email loss or files damage.

Re: subdomain

Posted by Leif Hedstrom <zw...@apache.org>.
On 08/09/2012 09:02 AM, adi.siswanto wrote:
> currently I only tried for
> map  http://*.bar.com/	http://bar.com:8001/*
> reverse_map http://bar.com:8001/* http://*.bar.com/
>

This is not valid syntax. Read the docs, or the example from the default 
remap.config. And yes, if you really want to match on *.bar.com, you 
should either use regex map, or map on the wildcard (/). E.g. the 
following would probably do what you want (assuming you only have bar.com):

     map / http://bar.com:8001


-- leif


RE: subdomain

Posted by "adi.siswanto" <ad...@indosatm2.com>.
currently I only tried for
map  http://*.bar.com/	http://bar.com:8001/*
reverse_map http://bar.com:8001/* http://*.bar.com/

should I use regex to solve this case ?


On Thu, 2012-08-09 at 10:44 -0400, Todd Harpersberger wrote:
> -Todd
> 
> Can you provide your remap rules?
> 
> -----Original Message-----
> From: adi.siswanto [mailto:adi.siswanto@indosatm2.com]
> Sent: Thursday, August 09, 2012 10:43 AM
> To: users@trafficserver.apache.org
> Subject: subdomain
> 
> dear all,
> i use apache to rewrite subdomain rule from foo.bar.com which is exactly
> call from folder bar.com/foo and it's running well.
> 
> And I try to put ATS in front of this system. But I can not make it happened
> because every time I call foo.bar.com it always send me to bar.com Any
> suggestion please ?
> 
> regards
> 
> Gunakan I-Pay untuk pembelian voucher game online, digital content,
> full-track dan lainnnya. Topup I-pay dapat menggunakan Transfer bank
> ,internet banking. Info lengkap I-Pay klik https://ipay.indosatm2.com/
> 
> Disclaimer
> 
> This is an e-mail from PT Indosat Mega Media intended solely for the named
> addresse(s). It is confidential and may contain legally privileged
> information. Therefore, any unauthorized use, disclosure or copying of this
> information is strictly prohibited.
> PT Indosat Mega Media does not accept liability for any email loss or files
> damage.
> 


Gunakan I-Pay untuk pembelian voucher game online, digital content, full-track dan lainnnya. Topup I-pay dapat menggunakan Transfer bank ,internet banking. Info lengkap I-Pay klik https://ipay.indosatm2.com/

Disclaimer

This is an e-mail from PT Indosat Mega Media intended solely for the named addresse(s). It is confidential and may contain legally privileged information. Therefore, any unauthorized use, disclosure or copying of this information is strictly prohibited. 
PT Indosat Mega Media does not accept liability for any email loss or files damage.

RE: subdomain

Posted by Todd Harpersberger <to...@ogilvy.com>.
-Todd

Can you provide your remap rules?

-----Original Message-----
From: adi.siswanto [mailto:adi.siswanto@indosatm2.com]
Sent: Thursday, August 09, 2012 10:43 AM
To: users@trafficserver.apache.org
Subject: subdomain

dear all,
i use apache to rewrite subdomain rule from foo.bar.com which is exactly
call from folder bar.com/foo and it's running well.

And I try to put ATS in front of this system. But I can not make it happened
because every time I call foo.bar.com it always send me to bar.com Any
suggestion please ?

regards

Gunakan I-Pay untuk pembelian voucher game online, digital content,
full-track dan lainnnya. Topup I-pay dapat menggunakan Transfer bank
,internet banking. Info lengkap I-Pay klik https://ipay.indosatm2.com/

Disclaimer

This is an e-mail from PT Indosat Mega Media intended solely for the named
addresse(s). It is confidential and may contain legally privileged
information. Therefore, any unauthorized use, disclosure or copying of this
information is strictly prohibited.
PT Indosat Mega Media does not accept liability for any email loss or files
damage.

-- 

 

Privileged/Confidential Information may be contained in this message. If
you are not the addressee indicated in this message, you should destroy
this message. For more information on WPP's business ethical standards
and corporate responsibility policies, please refer to WPP's website.