Basic Authorization

Implement basic authentication for your Nginx-Proxy containers using the PROXY_BASIC_AUTH environment variable.

Basic Authorization

Basic Auth can be enabled on the container with environment variable PROXY_BASIC_AUTH.

  • PROXY_BASIC_AUTH=user1:password1,user2:password2,user3:password3 adds basic auth feature to your configured VIRTUAL_HOST server root.
  • PROXY_BASIC_AUTH=example.com/api/v1/admin -> admin1:password1,admin2:password2 adds basic auth only to the location starting from api/v1/admin

Note: Basic authorization will be ignored if the container's host doesn't use https