Apache reverse proxy with basic authentication

前端 未结 3 1424
天涯浪人
天涯浪人 2020-12-07 15:43

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:

<
3条回答
  •  無奈伤痛
    2020-12-07 16:08

    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:

    
        AuthType Basic
        ...
    
    

    Outside the Location block you can put your proxy commands, such as:

    ProxyPass / http://localhost:8080/
    

提交回复
热议问题