# Proxy to different server based on basic auth username

**URL:** <https://www.ruby-forum.com/t/proxy-to-different-server-based-on-basic-auth-username/207980>\
**Category:** NGINX\
**Created:** [June 7, 2011, 3:57pm UTC](https://www.ruby-forum.com/t/proxy-to-different-server-based-on-basic-auth-username/207980 "2011-06-07T15:57:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [June 7, 2011, 3:57pm UTC](https://www.ruby-forum.com/t/proxy-to-different-server-based-on-basic-auth-username/207980/1 "2011-06-07T15:57:38Z")

</div>

Hi Nginx community,

I am trying to replace an existing Apache proxy with an equivalent  
on using nginx. The current proxy performs an LDAP basic auth and  
then using that information with a PHP script redirects to the  
correct server that handles that app for the user. Does anyone  
have any ideas about how to implement the same funtionality with  
nginx + modules?

Cheers,  
Ken
