Apache rewrite and reverse proxy

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Abdelkader
    New Member
    • Oct 2012
    • 1

    Apache rewrite and reverse proxy

    I have back end website running on Tomcat with the following url http://local.domain.co m/app. External user access the website through apache proxy with the following url http://www.domain.com/user1 (user1, user2, etc... It’s uri specific to each user). I want to use apache rewrite or/ and reverse proxy directive to translate the url like http://www.domain.com/user1 into http://local.domain.co m/app?user=user1
    Please can someone help me please?

    Thanks,

    Abdel
  • Luuk
    Recognized Expert Top Contributor
    • Mar 2012
    • 1043

    #2
    Code:
    ProxyPass /user1 http://local.domain.com/app?user=user1
    ProxyPassReverse /user1 http://local.domain.com/app?user=user1
    ProxyPass /user2 http://local.domain.com/app?user=user2
    ProxyPassReverse /user2 http://local.domain.com/app?user=user2
    I think above should work for user1 and user2, but i dont know how to do this dynamically for x users

    Comment

    Working...