|
4 | 4 |
|
5 | 5 | [Docker Repository](https://hub.docker.com/r/bfren/nginx-proxy) - [bfren ecosystem](https://github.com/bfren/docker)
|
6 | 6 |
|
7 |
| -Nginx Proxy which uses [getssl](https://github.com/srvrco/getssl) to automate requesting and renewing SSL certificates via Let's Encrypt. Certificates are checked for renewal every day - the last check can be viewed in the `/ssl` volume. |
| 7 | +Nginx Proxy which uses [getssl](https://github.com/srvrco/getssl) to automate requesting and renewing SSL certificates via Let's Encrypt. Certificates are checked for renewal every day - the last check can be viewed in the `/ssl` volume. Also includes [NAXSI](https://github.com/nbs-system/naxsi), a web application firewall. |
8 | 8 |
|
9 | 9 | As of v4, configuration is handled via a JSON file - see ssl-conf-sample.json for an example and ssl-conf-schema.json for the full file definition.
|
10 | 10 |
|
@@ -36,33 +36,34 @@ For SSL certificate requests to work correctly, ports 80 and 443 need mapping fr
|
36 | 36 |
|
37 | 37 | | Variable | Values | Description | Default |
|
38 | 38 | | ------------------------------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
|
39 |
| -| `PROXY_URI` | URI | The base URI of the proxy server - will be used to handle unbound requests. | *None* - **required** | |
| 39 | +| `PROXY_AUTO_PRIMARY` | URI | If set (along with PROXY_AUTO_UPSTREAM) SSL config will be generated on first startup. | *None* | |
| 40 | +| `PROXY_AUTO_UPSTREAM` | URI | If set (along with PROXY_AUTO_PRIMARY) SSL config will be generated on first startup. | *None* | |
| 41 | +| `PROXY_AUTO_ALIASES` | string of URIs | Add aliases to the auto-generated conf.json on first startup. | *None* | |
| 42 | +| `PROXY_AUTO_CUSTOM` | 0 or 1 | Mark the auto-generated SSL config to 'custom' so the Nginx configuration is not regenerated on startup. | 0 | |
40 | 43 | | `PROXY_CLEAN_INSTALL` | 0 or 1 | If 1, all Nginx and SSL configuration and certificates will be deleted and regenerated. | 0 |
|
| 44 | +| `PROXY_DOMAIN` | URI | The base domain of the proxy server - will be used to handle unbound requests. | *None* - **required** | |
| 45 | +| `PROXY_ENABLE_NAXSI` | 0 or 1 | If 1, NAXSI web application firewall will be enabled for all sites. | 0 | |
| 46 | +| `PROXY_GETSSL_SKIP_HTTP_TOKEN_CHECK` | true or false | Set to true to enable `getssl`'s [skip HTTP token check](https://github.com/srvrco/getssl/wiki/Config-variables#skip_http_token_checkfalse). | false | |
41 | 47 | | `PROXY_HARDEN` | 0 or 1 | If 1, only modern SSL ciphers and protocols will be enabled (some older devices may not be able to access it). | 0 |
|
42 | 48 | | `PROXY_LETS_ENCRYPT_EMAIL` | A valid email address | Used by Lets Encrypt for notification emails. | *None* - **required** |
|
43 | 49 | | `PROXY_LETS_ENCRYPT_LIVE` | 0 or 1 | Only set to 1 (to request live certificates) when your config is correct - Lets Encrypt rate limit certificate requests. | 0 |
|
| 50 | +| `PROXY_MAINTENANCE_REFRESH_SECONDS` | A valid integer | The number of seconds to count down before the maintenance page auto-refreshes. | 6 | |
44 | 51 | | `PROXY_SSL_DHPARAM_BITS` | A valid integer | The size of your DHPARAM variables - adjust down only if you have limited processing resources. | 4096 |
|
45 | 52 | | `PROXY_SSL_REDIRECT_TO_CANONICAL` | 0 or 1 | If 1, all requests will be redirected to the primary domain (defined in `conf.json`). | 0 |
|
46 |
| -| `PROXY_GETSSL_SKIP_HTTP_TOKEN_CHECK` | true or false | Set to true to enable `getssl`'s [skip HTTP token check](https://github.com/srvrco/getssl/wiki/Config-variables#skip_http_token_checkfalse). | false | |
47 |
| -| `PROXY_AUTO_PRIMARY` | URI | If set (along with PROXY_AUTO_UPSTREAM) SSL config will be generated on first startup. | *None* | |
48 |
| -| `PROXY_AUTO_UPSTREAM` | URI | If set (along with PROXY_AUTO_PRIMARY) SSL config will be generated on first startup. | *None* | |
49 |
| -| `PROXY_AUTO_ALIASES` | string of URIs | Add aliases to the auto-generated conf.json on first startup. | *None* | |
50 |
| -| `PROXY_AUTO_CUSTOM` | 0 or 1 | Mark the auto-generated SSL config to 'custom' so the Nginx configuration is not regenerated on startup. | 0 | |
51 | 53 | | `PROXY_UPSTREAM_DNS_RESOLVER` | IP address | Upstream DNS resolver - set to Docker's by default. | 127.0.0.11 |
|
52 |
| -| `PROXY_MAINTENANCE_REFRESH_SECONDS` | A valid integer | The number of seconds to count down before the maintenance page auto-refreshes. | 6 | |
53 | 54 |
|
54 | 55 | ## Helper Functions
|
55 | 56 |
|
56 |
| -| Function | Arguments | Description | |
57 |
| -| --------------------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | |
58 |
| -| `nginx-adduser` | 0: username, 1: password | Add a user to enable basic HTTP auth. | |
59 |
| -| `nginx-regenerate` | -f: force | Removes non-custom Nginx configuration files (in `/sites`) and regenerates based on `conf.json` (with force, removes all). | |
60 |
| -| `ssl-cleanup` | -m: mode | Removes SSL and Nginx configuration files and directories not defined in `conf.json` (mode 0 = dry run, 1 = live). | |
61 |
| -| `ssl-init` | *None* | Initialises SSL configuration based on `conf.json`. | |
62 |
| -| `ssl-regenerate` | *None* | Removes SSL configuration files (in `/ssl/certs`) and regenerates based on `conf.json`. | |
63 |
| -| `ssl-regenerate-full` | *None* | Removes SSL configuration files (in `/ssl/certs`), as well as DH parameters, and regenerates based on `conf.json`. | |
64 |
| -| `ssl-request` | *None* | Requests SSL certificates from Lets Encrypt. | |
65 |
| -| `ssl-update` | *None* | Attempts to update SSL certificates manually. | |
| 57 | +| Function | Arguments | Description | |
| 58 | +| --------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | |
| 59 | +| `nginx-adduser` | 0: username, 1: password | Add a user to enable basic HTTP auth. | |
| 60 | +| `nginx-regenerate` | -a: all domains, -d XXXXXX: only domain XXXXXX, -f: force | Removes non-custom Nginx configuration files (in `/sites`) and regenerates based on `conf.json` (with force, removes all). | |
| 61 | +| `ssl-cleanup` | -m: mode | Removes SSL and Nginx configuration files and directories not defined in `conf.json` (mode 0 = dry run, 1 = live). | |
| 62 | +| `ssl-init` | -a: all domains, -d XXXXXX: only domain XXXXXX | Initialises SSL configuration based on `conf.json`. | |
| 63 | +| `ssl-regenerate` | -a: all domains, -d XXXXXX: only domain XXXXXX | Removes SSL configuration files (in `/ssl/certs`) and regenerates based on `conf.json`. | |
| 64 | +| `ssl-regenerate-full` | *None* | Removes SSL configuration files (in `/ssl/certs`), as well as DH parameters, and regenerates based on `conf.json`. | |
| 65 | +| `ssl-request` | -a: all domains, -d XXXXXX: only domain XXXXXX | Requests SSL certificates from Lets Encrypt. | |
| 66 | +| `ssl-update` | -a: all domains, -d XXXXXX: only domain XXXXXX | Attempts to update SSL certificates manually. | |
66 | 67 |
|
67 | 68 | ## Nginx Configuration Helpers
|
68 | 69 |
|
|
0 commit comments