Skip to content
This repository was archived by the owner on Jan 6, 2021. It is now read-only.

Commit b02be52

Browse files
authored
Merge pull request #411 from nemchik/port-proto
Add Port and Proto variables
2 parents 0ef4f95 + 2a33062 commit b02be52

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

readme-vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ app_setup_nginx_reverse_proxy_block: ""
125125

126126
# changelog
127127
changelogs:
128+
- { date: "05.03.20:", desc: "Use port and proto upstream variables for ldap and default sample confs." }
128129
- { date: "24.02.20:", desc: "Remove world/group read permissions in dns-conf." }
129130
- { date: "23.02.20:", desc: "Add aliyun dns validation plugin." }
130131
- { date: "28.01.20:", desc: "Deprecate tls-sni validation method, remove from docs." }

root/defaults/default

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Version 2019/08/01 - Changelog: https://github.com/linuxserver/docker-letsencrypt/commits/master/root/defaults/default
1+
## Version 2020/03/05 - Changelog: https://github.com/linuxserver/docker-letsencrypt/commits/master/root/defaults/default
22

33
# redirect all traffic to https
44
server {
@@ -100,8 +100,10 @@ server {
100100
#
101101
# include /config/nginx/proxy.conf;
102102
# resolver 127.0.0.11 valid=30s;
103-
# set $upstream_heimdall heimdall;
104-
# proxy_pass https://$upstream_heimdall:443;
103+
# set $upstream_app heimdall;
104+
# set $upstream_port 443;
105+
# set $upstream_proto https;
106+
# proxy_pass $upstream_proto://$upstream_app:$upstream_port;
105107
# }
106108
#}
107109

root/defaults/ldap.conf

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
## Version 2018/08/10 - Changelog: https://github.com/linuxserver/docker-letsencrypt/commits/master/root/defaults/ldap.conf
1+
## Version 2020/03/05 - Changelog: https://github.com/linuxserver/docker-letsencrypt/commits/master/root/defaults/ldap.conf
22
## this conf is meant to be used in conjuntction with our ldap-auth image: https://github.com/linuxserver/docker-ldap-auth
33
## see the heimdall example in the default site config for info on enabling ldap auth
44
## for further instructions on this conf, see https://github.com/nginxinc/nginx-ldap-auth
55

66
location /login {
77
resolver 127.0.0.11 valid=30s;
8-
set $upstream_ldap ldap-auth;
9-
proxy_pass http://$upstream_ldap:9000;
8+
set $upstream_app ldap-auth;
9+
set $upstream_port 9000;
10+
set $upstream_proto http;
11+
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
1012
proxy_set_header X-Target $request_uri;
1113
}
1214

1315
location = /auth {
1416
resolver 127.0.0.11 valid=30s;
15-
set $upstream_ldap ldap-auth;
16-
proxy_pass http://$upstream_ldap:8888;
17+
set $upstream_app ldap-auth;
18+
set $upstream_port 8888;
19+
set $upstream_proto http;
20+
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
1721

1822
proxy_pass_request_body off;
1923
proxy_set_header Content-Length "";

0 commit comments

Comments
 (0)