Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using nginx as a proxy server in front of Tomcat instances.

There's basic authentication set up, giving access to the demo page just to a few users.

Is it possible to modify the proxy_pass parameter depending on the username provided by the client ?

Basically, if user1, user2, proxy http://host:1234, if user3, user4, proxy http://host:4321.

Thanks

share|improve this question

1 Answer 1

You could try using $remote_user variable with Map module to set proxy port.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.