Skip to content

Instantly share code, notes, and snippets.

@MinmoTech
Last active October 23, 2018 13:31
Show Gist options
  • Save MinmoTech/aaf72244b8b4a9c09fc80112ba25e79d to your computer and use it in GitHub Desktop.
Save MinmoTech/aaf72244b8b4a9c09fc80112ba25e79d to your computer and use it in GitHub Desktop.
dockstarter config
use=web, web=dynamicdns.park-your-domain.com/getip
protocol=namecheap
server=dynamicdns.park-your-domain.com
login=mydomain.site
password=mypassword
@, plex, deluge, sonarr, radarr, tautulli, portainer, organizr, www
## Version 2018/09/12 - Changelog: https://github.com/linuxserver/docker-letsencrypt/commits/master/root/defaults/default
# listening on port 80 disabled by default, remove the "#" signs to enable
# redirect all traffic to https
server {
listen 80;
server_name _;
return 301 https://$host$request_uri;
}
# main server block
server {
listen 443 ssl default_server;
root /config/www;
index index.html index.htm index.php;
server_name _;
# enable subfolder method reverse proxy confs
include /config/nginx/proxy-confs/*.subfolder.conf;
# all ssl related config moved to ssl.conf
include /config/nginx/ssl.conf;
# enable for ldap auth
#include /config/nginx/ldap.conf;
client_max_body_size 0;
# location / {
# try_files $uri $uri/ /index.html /index.php?$args =404;
# }
# location ~ \.php$ {
# fastcgi_split_path_info ^(.+\.php)(/.+)$;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# include /etc/nginx/fastcgi_params;
# }
# sample reverse proxy config for password protected couchpotato running at IP 192.168.1.50 port 5050 with base url "cp"
# notice this is within the same server block as the base
# don't forget to generate the .htpasswd file as described on docker hub
# location ^~ /cp {
# auth_basic "Restricted";
# auth_basic_user_file /config/nginx/.htpasswd;
# include /config/nginx/proxy.conf;
# proxy_pass http://192.168.1.50:5050/cp;
# }
}
# sample reverse proxy config without url base, but as a subdomain "cp", ip and port same as above
# notice this is a new server block, you need a new server block for each subdomain
#server {
# listen 443 ssl;
#
# root /config/www;
# index index.html index.htm index.php;
#
# server_name cp.*;
#
# include /config/nginx/ssl.conf;
#
# client_max_body_size 0;
#
# location / {
# auth_basic "Restricted";
# auth_basic_user_file /config/nginx/.htpasswd;
# include /config/nginx/proxy.conf;
# proxy_pass http://192.168.1.50:5050;
# }
#}
# sample reverse proxy config for "heimdall" via subdomain, with ldap authentication
# ldap-auth container has to be running and the /config/nginx/ldap.conf file should be filled with ldap info
# notice this is a new server block, you need a new server block for each subdomain
#server {
# listen 443 ssl;
#
# root /config/www;
# index index.html index.htm index.php;
#
# server_name heimdall.*;
#
# include /config/nginx/ssl.conf;
#
# include /config/nginx/ldap.conf;
#
# client_max_body_size 0;
#
# location / {
# # the next two lines will enable ldap auth along with the included ldap.conf in the server block
# auth_request /auth;
# error_page 401 =200 /login;
#
# include /config/nginx/proxy.conf;
# resolver 127.0.0.11 valid=30s;
# set $upstream_heimdall heimdall;
# proxy_pass https://$upstream_heimdall:443;
# }
#}
# enable subdomain method reverse proxy confs
include /config/nginx/proxy-confs/*.subdomain.conf;
# enable proxy cache for auth
proxy_cache_path cache/ keys_zone=auth_cache:10m;
# make sure that your dns has a cname set for organizr
server {
listen 443 ssl;
server_name organizr.*;
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 / {
# 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_organizr organizr;
proxy_pass http://$upstream_organizr:80;
}
location ~ /auth-(admin|user) {
# This is used for Organizr V1
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 "";
}
}
### LETSENCRYPT
LETSENCRYPT_ENABLED=true
LETSENCRYPT_NETWORK_MODE=
LETSENCRYPT_PORT_443=443
LETSENCRYPT_PORT_80=80
LETSENCRYPT_DNSPLUGIN=
[email protected]
LETSENCRYPT_EXTRA_DOMAINS=
LETSENCRYPT_ONLY_SUBDOMAINS=true
LETSENCRYPT_SUBDOMAINS=plex,portainer,sonarr,radarr,tautulli,jackett,deluge,organizr,www
LETSENCRYPT_URL=mydomain.site
LETSENCRYPT_VALIDATION=http
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment