Trying to configure my reverse proxy with basic authentication before forward the traffic to my back end server. Can any one give me a solution.
Example here:
User(internet) -> reverse proxy / vhosts server (need to add basic authentication here ) -> back end server ( non authenticated )
Introduction. The reverse proxy can be used to authenticate and authorize requests before they are proxied to the destination servers. This can reduce load on the destination servers, add a layer of protection, and ensure consistent policies are implemented across your applications.
In addition to being a "basic" web server, and providing static and dynamic content to end-users, Apache httpd (as well as most other web servers) can also act as a reverse proxy server, also-known-as a "gateway" server.
You can follow the instructions here: Authentication, Authorization and Access Control. The main difference for your reverse proxy is that you'll want to put the auth stuff inside a Location block, even though the docs say that they're only allowed in Directory blocks:
<Location /> AuthType Basic ... </Location>
Outside the Location block you can put your proxy commands, such as:
ProxyPass / http://localhost:8080/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With