mirror of
https://github.com/linuxserver/reverse-proxy-confs.git
synced 2025-07-06 21:11:31 -07:00
Merge pull request #113 from nemchik/org_auth
Split organizr-auth into separate conf
This commit is contained in:
commit
9a16263587
3 changed files with 40 additions and 37 deletions
36
organizr-auth.subfolder.conf.sample
Normal file
36
organizr-auth.subfolder.conf.sample
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
# To use config this with subfolder proxies:
|
||||||
|
# Rename this file to organizr-auth.subfolder.conf
|
||||||
|
# Add one of the auth_request lines from the comments below
|
||||||
|
# ex:
|
||||||
|
# auth_request /auth-0;
|
||||||
|
#
|
||||||
|
# To use config this with subdomain proxies:
|
||||||
|
# Rename this file to organizr-auth.subfolder.conf (the subfolder file name is still used)
|
||||||
|
# Add the following line in your other subdomain proxy configs
|
||||||
|
# include /config/nginx/proxy-confs/organizr-auth.subfolder.conf;
|
||||||
|
# Add one of the auth_request lines from the comments below
|
||||||
|
# ex:
|
||||||
|
# include /config/nginx/proxy-confs/organizr-auth.subfolder.conf;
|
||||||
|
# auth_request /auth-0;
|
||||||
|
|
||||||
|
location ~ /auth-([0-9]+) {
|
||||||
|
internal;
|
||||||
|
include /config/nginx/proxy.conf;
|
||||||
|
resolver 127.0.0.11 valid=30s;
|
||||||
|
set $upstream_organizr organizr;
|
||||||
|
proxy_pass http://$upstream_organizr:80/api/?v1/auth&group=$1;
|
||||||
|
proxy_set_header Content-Length "";
|
||||||
|
|
||||||
|
# Do not uncomment the lines below, these are examples for usue in other proxy configs
|
||||||
|
#auth_request /auth-0; #=Admin
|
||||||
|
#auth_request /auth-1; #=Co-Admin
|
||||||
|
#auth_request /auth-2; #=Super User
|
||||||
|
#auth_request /auth-3; #=Power User
|
||||||
|
#auth_request /auth-4; #=User
|
||||||
|
#auth_request /auth-998; #=Logged In
|
||||||
|
#auth_request /auth-999; #=Guest
|
||||||
|
}
|
||||||
|
|
||||||
|
# Optional redirect server authentication errors to organizr authentication page
|
||||||
|
# NOTE: $host must be modified to your public URL when using subdomain proxies
|
||||||
|
#error_page 401 $scheme://$host/?error=$status&return=$request_uri;
|
|
@ -28,23 +28,7 @@ server {
|
||||||
proxy_pass http://$upstream_organizr:80;
|
proxy_pass http://$upstream_organizr:80;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ /auth-(admin|user) {
|
# Optional redirect server errors to organizr error pages
|
||||||
# This is used for Organizr V1
|
#error_page 400 402 403 404 405 408 500 502 503 504 $scheme://$host/?error=$status;
|
||||||
internal;
|
|
||||||
include /config/nginx/proxy.conf;
|
|
||||||
resolver 127.0.0.11 valid=30s;
|
|
||||||
set $upstream_organizr organizr;
|
|
||||||
proxy_pass http://$upstream_organizr:80/auth.php?$1;
|
|
||||||
proxy_set_header Content-Length "";
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~ /auth-([0-9]+) {
|
|
||||||
# This is used for Organizr V2
|
|
||||||
internal;
|
|
||||||
include /config/nginx/proxy.conf;
|
|
||||||
resolver 127.0.0.11 valid=30s;
|
|
||||||
set $upstream_organizr organizr;
|
|
||||||
proxy_pass http://$upstream_organizr:80/api/?v1/auth&group=$1;
|
|
||||||
proxy_set_header Content-Length "";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,22 +15,5 @@ location / {
|
||||||
proxy_pass http://$upstream_organizr:80;
|
proxy_pass http://$upstream_organizr:80;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ /auth-(admin|user) {
|
# Optional redirect server errors to organizr error pages
|
||||||
# This is used for Organizr V1
|
#error_page 400 402 403 404 405 408 500 502 503 504 $scheme://$host/?error=$status;
|
||||||
internal;
|
|
||||||
include /config/nginx/proxy.conf;
|
|
||||||
resolver 127.0.0.11 valid=30s;
|
|
||||||
set $upstream_organizr organizr;
|
|
||||||
proxy_pass http://$upstream_organizr:80/auth.php?$1;
|
|
||||||
proxy_set_header Content-Length "";
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~ /auth-([0-9]+) {
|
|
||||||
# This is used for Organizr V2
|
|
||||||
internal;
|
|
||||||
include /config/nginx/proxy.conf;
|
|
||||||
resolver 127.0.0.11 valid=30s;
|
|
||||||
set $upstream_organizr organizr;
|
|
||||||
proxy_pass http://$upstream_organizr:80/api/?v1/auth&group=$1;
|
|
||||||
proxy_set_header Content-Length "";
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue