I have currently solved a problem of authentication on a webserver behind apache reverse proxy.Using drupal.
I will request to include some more information to setup a reverse proxy server
since when the reverse proxy forwards the request to another server behind it it needs to handle the X-Forward-headers appropriately and set cookies accordingly .This information can be added in the reverse proxy apache configuration on a how to on your site.
The problem I am referring to is a very common thing
If I am not using drupal then how to go for it.