1
0
mirror of https://github.com/nginx-proxy/nginx-proxy synced 2024-09-16 17:01:51 +02:00
Commit Graph

268 Commits

Author SHA1 Message Date
mikfar
c5f054ed36
fix: limit exposed ports in template comment to 10 (#2494)
Co-authored-by: Nicolas Duchon <nicolas.duchon@gmail.com>
2024-07-29 21:00:42 +02:00
Nicolas Duchon
5f4e77b6e7 fix: use fastcgi.conf on alpine and fastcgi_params on debien 2024-07-29 18:15:04 +02:00
Gilles Filippini
4606b15309 fix: nohttp(s) shouldn't disable fallback server
Say we have two containers:
- `app1` with `HTTPS_METHOD=redirect`
- `app2` with `HTTPS_METHOD=nohttps`

Without this change the fallback answer on an HTTPS request to an unknown
server would change depending on whether `app1` is up (503) or not
(connection refused). This is not wanted.

In case someone doesn't want HTTPS at all, they just have to not bind
port 443.
2024-06-06 22:04:15 +02:00
Gilles Filippini
60b123d249 feat: ENABLE_HTTP_ON_MISSING_CERT variable
Default: true
2024-06-06 11:26:17 +02:00
Nicolas Duchon
4bd542de99
feat: handle acme challenge location by default 2024-06-05 08:47:11 +02:00
pini-gh
9cf736f1f8
feat: variable ACME_HTTP_CHALLENGE_LOCATION (#2468)
Values:
* `legacy` (default): generate location blocks for ACME HTP Challenge
  excepted when `HTTPS_METHOD=noredirect` or there is no certificate for
  the domain
* `true`: generate location blocks for ACME HTP Challenge in all cases
* `false`: do not generate location blocks for ACME HTP Challenge

This feature is currently needed because acme-companion may generate
the HTTP Challenge configuration while it was done already by nginx-proxy
(see #2465#issuecomment-2136361373).

Also sometimes a hardcoded ACME challenge location is not wanted because
the challenge validation is not done with acme-companion / Let's Encrypt,
and with a challenge location setup differently.
2024-05-31 00:10:44 +02:00
pini-gh
5f3ec18b28
docs: explicit policy on missing certificate (#2465)
* chore/doc: explicit policy on missing certificate

This doesn't change the current nginx-proxy behavior, but makes explicit
the current HTTPS_METHOD policy on missing certificate.

* fix: bad wording about missing certificate

Co-authored-by: Nicolas Duchon <nicolas.duchon@gmail.com>

* docs: typo in suggestion

---------

Co-authored-by: Nicolas Duchon <nicolas.duchon@gmail.com>
2024-05-27 20:50:13 +02:00
Nicolas Duchon
fb9c3a646a
feat: custom default error page (#2430)
* feat: customizable error page

* fix: use regex on catchall root location to fix DEFAULT_ROOT=none test

* docs: custom error pages

* fix: don't use default nginx image error page

* docs: small fix
2024-05-22 08:23:48 +02:00
Rodrigo Aguilera
8e372c39c2
fix: include a complete fastcgi_params config 2024-05-16 13:11:50 +02:00
Gilles Filippini
91652aac48 fix: constistent behavior for HTTPS_METHOD=nohttp
Without this fix the response of nohttp sites to HTTP requests changes
depending on the existence of at least one HTTP enabled site:
* no HTTP enabled sites -> connection refused
* at least one HTTP enabled site -> 503

This fix ensures the response is always 503.
2024-05-14 22:37:32 +02:00
Gilles Filippini
6c1b532ffb Improve acme-challenge handling
So that there is no need anymore for the Let's Encrypt companion to fiddle
with vhosts nginx configuration.

When `HTTPS_METHOD=nohttp` and the certificate is missing, enforce nohttp
instead of switching to `HTTPS_METHOD=redirect`.
2024-05-13 21:10:48 +02:00
Nicolas Duchon
be7c4c8c85
fix: do not discard containers without VIRTUAL_PATH
For containers grouped by identical VIRTUAL_HOST,
those with no VIRTUAL_PATH variable were silently discarded
when at least one container with VIRTUAL_PATH existed.
2024-05-05 16:36:04 +02:00
Nicolas Duchon
53e9a03ac9
feat: print warning on unparsable VIRTUAL_HOST_MULTIPORTS 2024-05-05 16:15:28 +02:00
Nicolas Duchon
0baff189bc
refactor: get rid of get_path_info template 2024-05-05 16:15:28 +02:00
Nicolas Duchon
47e2838e61
refactor: rename VIRTUAL_HOST_YAML -> VIRTUAL_HOST_MULTIPORTS 2024-05-05 16:15:27 +02:00
Nicolas Duchon
62d9c08474
fix: default values if port and dest are missing 2024-05-05 16:15:27 +02:00
Nicolas Duchon
fc98f4c953
refactor: cleanup template 2024-05-05 16:15:27 +02:00
Gilles Filippini
87e5b58b77
feat: multiports support using yaml syntax
(See nginx-proxy/nginx-proxy#1504)

Using variable VIRTUAL_HOST_MULTIPORTS as a dictionnary:

key: hostname
value: dictionnary:
  key: path
  value: struct
    port
    dest

When the dictionnary associated with a hostname is empty, default values
apply:
  path = "/"
  port = default port
  dest = ""

For each path entry, port and dest are optionnal and are assigned default
values when missing.

Example:
      VIRTUAL_HOST_MULTIPORTS: |
        host1.example.org:
          "/":
            port: 8000
          "/somewhere":
            port: 9000
            dest: "/elsewhere"
        host2.example.org:
        host3.example.org:
          "/inner/path":
2024-05-05 16:15:26 +02:00
Gilles Filippini
45770e04bd refactor: add 'ports' dict to the data structure
Nothing changes for the legacy syntax, but adding this level to the data
structure enables advanced port configuration.
2024-03-09 20:13:42 +01:00
Nicolas Duchon
b09575297d
docs: typo in comments
Co-authored-by: Niek <100143256+SchoNie@users.noreply.github.com>
2024-02-27 13:27:11 +01:00
Nicolas Duchon
418f1a3cd0
fix: don't re-assign variable
Co-authored-by: pini-gh <pini@debian.org>
2024-02-27 13:20:39 +01:00
Nicolas Duchon
e97be61272
refactor: refactor virtual paths 2024-02-24 21:51:50 +01:00
Nicolas Duchon
4d9d067630
refactor: refactor virtual hosts 2024-02-24 21:51:38 +01:00
Niek
d4438b5a09
prevent double slash 2024-02-19 12:23:19 +01:00
Nicolas Duchon
76778cebb1
refactor: parse LOG_JSON as boolean + avoid unnecessary backticks 2024-02-10 18:40:18 +01:00
Denis Arh
de9809a9e5 Add more control over log_format config directive
Introduces 3 new environmental variables:
 - `LOG_FORMAT`
 - `LOG_FORMAT_ESCAPE`
 - `LOG_JSON`

`LOG_FORMAT` and `LOG_FORMAT_ESCAPE` default to standard values.
When `LOG_JSON` is set, defaults are changed to: `{"time_local":"$time_iso8601","client_ip":"$http_x_forwarded_for","remote_addr":"$remote_addr","request":"$request","status":"$status","body_bytes_sent":"$body_bytes_sent","request_time":"$request_time","upstream_response_time":"$upstream_response_time","upstream_addr":"$upstream_addr","http_referrer":"$http_referer","http_user_agent":"$http_user_agent","request_id":"$request_id"}`and `json`.

See `nginx.tmpl` and https://nginx.org/en/docs/http/ngx_http_log_module.html#log_format for details
2024-02-10 17:39:16 +01:00
jmformenti
fa23c11edb
feat: define basic auth for virtual path 2024-02-10 16:24:00 +01:00
Nicolas Duchon
40a347bfae
fix: add non standard port to Host header 2024-02-10 15:23:35 +01:00
Nicolas Duchon
d46881fb58
Merge pull request #2321 from theFra985/patch-1
Add support for grpcs protocol
2024-01-16 18:59:45 +01:00
Nicolas Duchon
d56e8f1d8a refactor: $server_found and $servers aren't both needed 2023-12-26 18:43:05 +01:00
Nicolas Duchon
7ce72d59a9 feat: add auto keepalive setting 2023-12-26 18:33:28 +01:00
Nicolas Duchon
26db13387e refactor: explicitely default keepalive to disabled 2023-12-26 17:58:24 +01:00
Nicolas Duchon
5c1db95551 feat: enable proxy_buffering 2023-12-25 17:27:34 +01:00
Gilles Filippini
a2ade38abb fix #2310
Check the '.Internal' network property, because the .Gateway property is
defined for internal networks as well.
2023-12-19 19:21:00 +01:00
Nicolas Duchon
4c556290f9
fix: enforce TLSv1.3 on Mozilla-Modern SSL policy 2023-12-08 22:41:29 +01:00
Nicolas Duchon
c6868ed6be
fix: SSL cipher suites / TLSv1.3 2023-12-08 22:06:07 +01:00
Nicolas Duchon
ec0d908a44
feat: add AWS TLS 1.3 security policies 2023-12-08 17:59:26 +01:00
Nicolas Duchon
664ba246fd
fix: remove unsupported TLSv1.3 from new AWS SSL policies 2023-12-08 16:44:48 +01:00
patrickdk
099ac04576
feat: add new SSL policies 2023-12-08 16:44:47 +01:00
Nicolas Duchon
018db70367
refactor: re-organise template for HTTP/3 feature
Co-authored-by: Nicolas Duchon <nicolas.duchon@gmail.com>
Co-authored-by: Niek <100143256+SchoNie@users.noreply.github.com>
2023-12-08 00:48:08 +01:00
Nicolas Duchon
b5cc9b1aa2
feat: experimental http3 support
Co-authored-by: Nicolas Duchon <nicolas.duchon@gmail.com>
Co-authored-by: Knapoc <Knapoc@users.noreply.github.com>
2023-12-08 00:48:08 +01:00
Nicolas Duchon
5af973b193
feat: optionally disable HTTP/2 2023-12-08 00:48:08 +01:00
Francesco Cattoni
a5566f5e8f
Added support for grpcs protocol 2023-10-22 00:34:32 +02:00
Nicolas Duchon
45c181b972 build: update template for nginx 1.25.1
http2 on the listen directive have been deprecated and replaced by the server level http2 directive.
2023-07-04 07:54:38 +02:00
Nicolas Duchon
c1a2b31f35
Merge pull request #2222 from rot169/support-hostnet-containers
Support containers running --net=host (#1537)
2023-06-07 07:55:28 +02:00
azlux
a06bb9e68b
fix: add missing cipher suite to Mozilla-Intermediate (#2247) 2023-05-22 12:21:35 +02:00
Nicolas Duchon
35b1493e16
feat: support proxy + container in host network mode 2023-05-09 19:31:42 +02:00
Nicolas Duchon
b88d33d2f3
feat: handle multiple proxy networks 2023-05-09 00:58:05 +02:00
Nicolas Duchon
e2539b04f5
fix: always on session cache on HTTPS fallback listener 2023-05-08 23:14:09 +02:00
Andy
325fd01ebb Support containers running --net=host (#1537)
Detect if a target container is running host networking, and if so, use the IP address of the first bridge net gateway.
2023-04-23 14:09:33 +01:00