For local test, I'm using Charles proxy, for those who don't know about it is a tool to debug HTTP requests. It can be configured to act as a proxy and intercept requests/responses and is able to do several things with it, like the most important for me, "remap" a domain to another.
It means that when I want set up the proxy on my mobile device and try to access a.domain.tld
and b.domain.tld
I can configure Charles to redirect transparently data to c.domain.tld
and d.domain.tld
.
This is what I want to do with Apache (preferably) (but suggestion are welcome).
I know a little about mod_proxy
but I couldn't find any similar example, I bet I can do something with it while playing around with the rewrite mod, but I'm sure there is a simple thing to do.
What I want to do:
- Configure a vhost within apache called
proxy.domain.tld
- It will act as any proxy except for the domain
a.domain.tld
andb.domain.tld
for which it will targetc.domain.tld
andd.domain.tld
respectively instead.
Any advices?