joelang6126

organizr-auth.subfolder

Aug 5th, 2020
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. # To use config this with subfolder proxies:
  2. # Rename this file to organizr-auth.subfolder.conf
  3. # Add one of the auth_request lines from the comments below
  4. # ex:
  5. # auth_request /auth-0;
  6. #
  7. # To use config this with subdomain proxies:
  8. # Rename this file to organizr-auth.subfolder.conf (the subfolder file name is still used)
  9. # Add the following line in your other subdomain proxy configs
  10. # include /config/nginx/proxy-confs/organizr-auth.subfolder.conf;
  11. # Add one of the auth_request lines from the comments below
  12. # ex:
  13. # include /config/nginx/proxy-confs/organizr-auth.subfolder.conf;
  14. # auth_request /auth-0;
  15.  
  16. location ~ /auth-([0-9]+) {
  17. internal;
  18. include /config/nginx/proxy.conf;
  19. resolver 127.0.0.11 valid=30s;
  20. set $upstream_auth_app organizr;
  21. set $upstream_auth_port 80;
  22. set $upstream_auth_proto http;
  23. proxy_pass $upstream_auth_proto://$upstream_auth_app:$upstream_auth_port/api/?v1/auth&group=$1;
  24. proxy_set_header Content-Length "";
  25.  
  26. # Do not uncomment the lines below, these are examples for usue in other proxy configs
  27. #auth_request /auth-0; #=Admin
  28. #auth_request /auth-1; #=Co-Admin
  29. #auth_request /auth-2; #=Super User
  30. #auth_request /auth-3; #=Power User
  31. #auth_request /auth-4; #=User
  32. #auth_request /auth-998; #=Logged In
  33. #auth_request /auth-999; #=Guest
  34. }
  35.  
  36. # Optional redirect server authentication errors to organizr authentication page
  37. # NOTE: $host must be modified to your public URL when using subdomain proxies
  38. #error_page 401 $scheme://$host/?error=$status&return=$request_uri;
  39.  
Add Comment
Please, Sign In to add comment