Skip to content

Instantly share code, notes, and snippets.

@drizuid
Created April 28, 2020 17:14
Show Gist options
  • Save drizuid/8d6f41966f07e31cec9cbe0c5e5c6560 to your computer and use it in GitHub Desktop.
Save drizuid/8d6f41966f07e31cec9cbe0c5e5c6560 to your computer and use it in GitHub Desktop.
allow and deny statements
# make sure that your dns has a cname set for radarr and that your radarr container is not using a base url
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name radarr.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
# enable for ldap auth, fill in ldap details in ldap.conf
#include /config/nginx/ldap.conf;
location / {
allow 192.168.0.0/16;
allow <ipv6 space>::/64;
allow fe80::/16;
allow 172.20.0.0/16;
deny all;
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
# enable the next two lines for ldap auth
#auth_request /auth;
#error_page 401 =200 /login;
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_radarr radarr;
proxy_pass http://$upstream_radarr:7878;
}
location ~ (/radarr)?/api {
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_radarr radarr;
proxy_pass http://$upstream_radarr:7878;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment