Skip to content

Commit

Permalink
Release 6.5.0 - See CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tiredofit committed Aug 7, 2024
1 parent 7bb826a commit 62b4ad7
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 3 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 6.5.0 2024-08-07 <terryzwt>

### Added
- Add NGINX_RESOLVER environment variable to use a specific resolver when looking up DNS hostnames in proxy mode

### Changed
- Fix nginx reload configuration service to look for proper config folders


## 6.4.15 2024-05-29 <dave at tiredofit dot ca>

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ You can choose to request visitors be authenticated before accessing your site.

| Parameter | Description | Default | `_FILE` |
| ------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------- | ------- |
| `NGINX_RESOLVER` | resolver | `127.0.0.11` | |
| `NGINX_AUTHENTICATION_TYPE` | Protect the site with `BASIC`, `LDAP`, `LLNG` | `NONE` | |
| `NGINX_AUTHENTICATION_TITLE` | Challenge response when visiting protected site | `Please login` | |
| `NGINX_AUTHENTICATION_BASIC_USER1` | If `BASIC` chosen enter this for the username to protect site | `admin` | x |
Expand Down Expand Up @@ -277,6 +276,7 @@ Presently you can compress your served content with gzip and brotli. More compre
| `NGINX_FORCE_RESET_PERMISSIONS` | Force setting Nginx files ownership to web server user | `TRUE` |
| `NGINX_MODE` | Set to `NORMAL`, `MAINTENANCE` , `PROXY`, `REDIRECT` | `NORMAL` |
| `NGINX_REDIRECT_URL` | If `REDIRECT` set enter full url to forward all traffic to eg `https://example.com` | |
| `NGINX_RESOLVER` | Resolve hostnames via DNS. Space seperated values. e.g. `127.0.0.11` | |
| `NGINX_PROXY_URL` | If `REDIRECT` set enter full url to proxy all traffic to eg `https://example.com:443` | |
| `NGINX_SITE_ENABLED` | What sites to enable in `/etc/nginx/sites.available` Don't use `.conf` suffix | `ALL` |
| `NGINX_USER` | What user to run nginx as inside container | `nginx` |
Expand Down
1 change: 0 additions & 1 deletion install/assets/defaults/10-nginx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/command/with-contenv bash

ENABLE_NGINX=${ENABLE_NGINX:-"TRUE"}
NGINX_RESOLVER=${NGINX_RESOLVER:-"127.0.0.11"}
NGINX_AUTHENTICATION_BASIC_PASS=${NGINX_AUTHENTICATION_BASIC_PASS:-password}
NGINX_AUTHENTICATION_BASIC_USER=${NGINX_AUTHENTICATION_BASIC_USER:-admin}
NGINX_AUTHENTICATION_LDAP_ATTRIBUTE=${NGINX_AUTHENTICATION_LDAP_ATTRIBUTE:-"uid"}
Expand Down
8 changes: 7 additions & 1 deletion install/assets/functions/10-nginx
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,6 @@ nginx_configure_mode() {

nginx_configure_server() {
update_template /etc/nginx/nginx.conf \
NGINX_RESOLVER \
NGINX_CLIENT_BODY_BUFFER_SIZE \
NGINX_CLIENT_BODY_TIMEOUT \
NGINX_FASTCGI_BUFFERS \
Expand Down Expand Up @@ -444,6 +443,13 @@ nginx_configure_server() {
PROTOCOL="http://"
fi

if [ -n "${NGINX_RESOLVER}" ]; then
update_template /etc/nginx/snippets/resolver.conf \
NGINX_RESOLVER
else
sed -i "\|include /etc/nginx/snippets/resolver.conf;|d" /etc/nginx/nginx.conf
fi

if var_false "${NGINX_ENABLE_MULTI_ACCEPT}"; then
sed -i "\|multi_accept on;|d" /etc/nginx/nginx.conf
fi
Expand Down
1 change: 1 addition & 0 deletions install/etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ http {
include /etc/nginx/snippets/bot_blocker.conf;
include /etc/nginx/snippets/ddos_protection.conf;
include /etc/nginx/snippets/open_file_cache.conf;
include /etc/nginx/snippets/resolver.conf;
include /etc/nginx/snippets/compression_gzip.conf;
include /etc/nginx/snippets/compression_brotli.conf;
include /etc/nginx/snippets/monitoring.conf;
Expand Down
1 change: 1 addition & 0 deletions install/etc/nginx/snippets/resolver.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver {{NGINX_RESOLVER}};

0 comments on commit 62b4ad7

Please sign in to comment.