Skip to content

Instantly share code, notes, and snippets.

@chazlarson
Forked from Fma965/app.domain.tld_location
Created June 30, 2019 17:11
Show Gist options
  • Save chazlarson/f0dfd19d334a9804400cc7efb2dd736e to your computer and use it in GitHub Desktop.
Save chazlarson/f0dfd19d334a9804400cc7efb2dd736e 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment