Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Hostame rewrite based on location? |
|
Author |
|
trudesea
Joined: 21 Jun 2016 Posts: 1 Location: Dacula
|
Posted: Tue 21 Jun '16 22:32 Post subject: Hostame rewrite based on location? |
|
|
Hi all,
I have a odd situation where I need to reverse proxy to several internal dynamically created internal hosts based on the location
For example, www.example.com/75647 would proxy to a specific internal server. The issue is that the web application requires a specific hostname in order to work.
So, what I would need to do is anything that comes into the url http://www.example.com/75647 would need a hostname rewrite to a value of http://myexample.example.com/
We have several of these internal hosts and the user accesses them based on the location (ex. 75647), which changes. We have a proxy.conf file that has all of these locations (<Location /75647>....</Location>) defined, but all need a hostname rewrite to myexample.example.com. The proxy.conf file is written dynamically with confd.
Is this possible using rewrite conditions or is there a more simple way?
Thanks for any suggestions |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Sat 25 Jun '16 22:12 Post subject: |
|
|
You can use
<Location "/75647">
</Location>
and inside of that you can define a reverse proxy. |
|
Back to top |
|
|
|
|
|
|