Skip to content

Commit

Permalink
Merge pull request #20 from terryzwt/main
Browse files Browse the repository at this point in the history
Update nginx.conf
  • Loading branch information
tiredofit authored Aug 7, 2024
2 parents b8187fe + 11d52f6 commit 7bb826a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ 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
1 change: 1 addition & 0 deletions install/assets/defaults/10-nginx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/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
1 change: 1 addition & 0 deletions install/assets/functions/10-nginx
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ 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
2 changes: 2 additions & 0 deletions install/etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ http {
tcp_nopush on;
tcp_nodelay on;

resolver {{NGINX_RESOLVER}};

client_body_timeout {{NGINX_CLIENT_BODY_TIMEOUT}};
send_timeout {{NGINX_SEND_TIMEOUT}};
reset_timedout_connection on;
Expand Down

0 comments on commit 7bb826a

Please sign in to comment.