Skip to content

Instantly share code, notes, and snippets.

@Fma965
Last active July 10, 2019 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Fma965/6611cb04a361f816e83ec488a0653cb7 to your computer and use it in GitHub Desktop.
Save Fma965/6611cb04a361f816e83ec488a0653cb7 to your computer and use it in GitHub Desktop.
Organizr auth working on Cloudbox
# FILE - /opt/nginx-proxy/vhost.d/app.domain.tld_location e.g sonarr.cloubox.com_location
auth_request /auth-2;
# optional failsafe basic auth
satisfy any;
auth_basic "Failsafe Authentication";
auth_basic_user_file /path/to/htpasswd;
## Full group list
# 0=Admin
# 1=Co-Admin
# 2=Super User
# 3=Power User
# 4=User
## you may also be able to save this as default_location and it will work for all vhosts which don't have a individual configuration
# FILE - /opt/nginx-proxy/vhost.d/default
location ~ /auth-(.*) {
internal;
proxy_pass http://domain.tld/api/?v1/auth&group=$1;
proxy_set_header Content-Length "";
}
## Make sure to replace domain.tld with either organizr.domain.tld or if you have direct_domain enabled then just domain.tld
@Coolfeather2
Copy link

I also figured out you can use the container network alias for the Auth request:

## Organizr authentication

location ~ /auth-(.*) {
        internal;
        proxy_pass http://organizr/api/?v1/auth&group=$1;
        proxy_set_header Content-Length "";
}

## End of Organizr Authentication

You can't use the container alias for the Organizr error pages though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment