{"id":19302146,"url":"https://github.com/wodby/nginx","last_synced_at":"2025-04-05T08:05:43.114Z","repository":{"id":38748192,"uuid":"79435474","full_name":"wodby/nginx","owner":"wodby","description":"Nginx docker container image","archived":false,"fork":false,"pushed_at":"2025-02-16T02:28:51.000Z","size":500,"stargazers_count":72,"open_issues_count":22,"forks_count":56,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-28T01:58:35.272Z","etag":null,"topics":["alpine","docker","nginx"],"latest_commit_sha":null,"homepage":"https://wodby.com/stacks","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wodby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-19T09:08:03.000Z","updated_at":"2025-02-16T02:28:52.000Z","dependencies_parsed_at":"2023-02-09T11:30:49.599Z","dependency_job_id":"184f2cc3-d013-4818-9c4f-51e7458b1f01","html_url":"https://github.com/wodby/nginx","commit_stats":null,"previous_names":[],"tags_count":217,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wodby%2Fnginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wodby%2Fnginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wodby%2Fnginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wodby%2Fnginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wodby","download_url":"https://codeload.github.com/wodby/nginx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305933,"owners_count":20917208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpine","docker","nginx"],"created_at":"2024-11-09T23:20:21.906Z","updated_at":"2025-04-05T08:05:43.062Z","avatar_url":"https://github.com/wodby.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nginx Docker Container Images\n\n[![Build Status](https://github.com/wodby/nginx/workflows/Build%20docker%20image/badge.svg)](https://github.com/wodby/nginx/actions)\n[![Docker Pulls](https://img.shields.io/docker/pulls/wodby/nginx.svg)](https://hub.docker.com/r/wodby/nginx)\n[![Docker Stars](https://img.shields.io/docker/stars/wodby/nginx.svg)](https://hub.docker.com/r/wodby/nginx)\n\n- [Docker images](#docker-images)\n- [Environment variables](#environment-variables)\n- [Build arguments](#build-arguments)\n- [Nginx modules](#nginx-modules)\n    - [ModSecurity]\n- [Default behaviour](#default-behavior)\n- [Customization](#customization)\n- [Virtual hosts presets](#virtual-hosts-presets)\n    - [HTML](#html)\n    - [HTTP proxy (application server)](#http-proxy-application-server)\n    - [Django](#django)\n    - [PHP-based (FastCGI)](#PHP-based-fastcgi)\n        - [PHP](#php)\n        - [Laravel](#laravel)\n        - [WordPress](#wordpress)\n        - [Drupal](#drupal)\n        - [Matomo](#matomo)\n    - [Custom preset](#custom-preset)\n    - [No preset](#no-preset)\n- [Orchestration actions](#orchestration-actions)\n\n## Docker Images\n\n❗For better reliability we release images with stability tags (`wodby/nginx:1.26-X.X.X`) which correspond\nto [git tags](https://github.com/wodby/nginx/releases). We strongly recommend using images only with stability tags.\n\nOverview:\n\n- All images based on Alpine Linux\n- Base image: [wodby/alpine](https://github.com/wodby/alpine)\n- [GitHub actions builds](https://github.com/wodby/nginx/actions)\n- [Docker Hub](https://hub.docker.com/r/wodby/nginx)\n\nSupported tags and respective `Dockerfile` links:\n\n- `1.27`, `1`, `latest` [_(Dockerfile)_](https://github.com/wodby/nginx/tree/master/Dockerfile)\n- `1.26` [_(Dockerfile)_](https://github.com/wodby/nginx/tree/master/Dockerfile)\n\nAll images built for `linux/amd64` and `linux/arm64`\n\n## Environment Variables\n\n| Variable                                             | Default Value                 | Description                         |\n|------------------------------------------------------|-------------------------------|-------------------------------------|\n| `NGINX_ALLOW_ACCESS_HIDDEN_FILES`                    |                               |                                     |\n| `NGINX_BACKEND_FAIL_TIMEOUT`                         | `0`                           |                                     |\n| `NGINX_BACKEND_HOST`                                 | Varies with a preset          |                                     |\n| `NGINX_BACKEND_PORT`                                 | Varies with a preset          |                                     |\n| `NGINX_BROTLI`                                       | `on`                          |                                     |\n| `NGINX_BROTLI_STATIC`                                | `on`                          |                                     |\n| `NGINX_BROTLI_COMP_LEVEL`                            | `1`                           |                                     |\n| `NGINX_CLIENT_BODY_BUFFER_SIZE`                      | `16k`                         |                                     |\n| `NGINX_CLIENT_BODY_TIMEOUT`                          | `60s`                         |                                     |\n| `NGINX_CLIENT_HEADER_BUFFER_SIZE`                    | `4k`                          |                                     |\n| `NGINX_CLIENT_HEADER_TIMEOUT`                        | `60s`                         |                                     |\n| `NGINX_CLIENT_MAX_BODY_SIZE`                         | `32m`                         |                                     |\n| `NGINX_CONF_INCLUDE`                                 | `conf.d/*.conf`               |                                     |\n| `NGINX_DISABLE_CACHING`                              |                               |                                     |\n| `NGINX_DJANGO_MEDIA_ROOT`                            | `/var/www/html/media/`        |                                     |\n| `NGINX_DJANGO_MEDIA_URL`                             | `/media/`                     |                                     |\n| `NGINX_DJANGO_STATIC_ROOT`                           | `/var/www/html/static/`       |                                     |\n| `NGINX_DJANGO_STATIC_URL`                            | `/static/`                    |                                     |\n| `NGINX_DRUPAL_ALLOW_XML_ENDPOINTS`                   |                               |                                     |\n| `NGINX_DRUPAL_FILE_PROXY_URL`                        |                               | e.g. `http://dev.example.com`       |\n| `NGINX_DRUPAL_FILES_STATIC_EXT_REGEX`                | `txt`                         |                                     |\n| `NGINX_DRUPAL_HIDE_HEADERS`                          |                               |                                     |\n| `NGINX_DRUPAL_XMLRPC_SERVER_NAME`                    |                               | Drupal 7 only                       |\n| `NGINX_DRUPAL_NOT_FOUND_REGEX`                       | (see [Drupal](#drupal))       |                                     |\n| `NGINX_WP_NOT_FOUND_REGEX`                           | (see [Wordpress](#wordpress)) |                                     |\n| `NGINX_ERROR_403_URI`                                |                               |                                     |\n| `NGINX_ERROR_404_URI`                                |                               |                                     |\n| `NGINX_ERROR_LOG_LEVEL`                              | `error`                       |                                     |\n| `NGINX_ERROR_MESSAGE_50x`                            |                               |                                     |\n| `NGINX_FASTCGI_BUFFER_SIZE`                          | `32k`                         | For PHP-based presets only          |\n| `NGINX_FASTCGI_BUFFERS`                              | `16 32k`                      | For PHP-based presets only          |\n| `NGINX_FASTCGI_INDEX`                                | `index.php`                   | For PHP-based presets only          |\n| `NGINX_FASTCGI_INTERCEPT_ERRORS`                     | `on`                          | For PHP-based presets only          |\n| `NGINX_FASTCGI_READ_TIMEOUT`                         | `900`                         | For PHP-based presets only          |\n| `NGINX_GZIP_BUFFERS`                                 | `16 8k`                       |                                     |\n| `NGINX_GZIP_COMP_LEVEL`                              | `1`                           |                                     |\n| `NGINX_GZIP_DISABLE`                                 | `msie6`                       |                                     |\n| `NGINX_GZIP_HTTP_VERSION`                            | `1.1`                         |                                     |\n| `NGINX_GZIP_MIN_LENGTH`                              | `20`                          |                                     |\n| `NGINX_GZIP_PROXIED`                                 | `any`                         |                                     |\n| `NGINX_GZIP_VARY`                                    | `on`                          |                                     |\n| `NGINX_GZIP`                                         | `on`                          |                                     |\n| `NGINX_HEADERS_CONTENT_SECURITY_POLICY`              | `frame-ancestors: 'none'`     | different for Drupal and WP presets |\n| `NGINX_HIDE_50x_ERRORS`                              |                               |                                     |\n| `NGINX_HTTP2`                                        |                               |                                     |\n| `NGINX_INDEX_FILE`                                   | Varies with a preset          | Hard-coded for Drupal and WP        |\n| `NGINX_KEEPALIVE_REQUESTS`                           | `100`                         |                                     |\n| `NGINX_KEEPALIVE_TIMEOUT`                            | `75s`                         |                                     |\n| `NGINX_LARGE_CLIENT_HEADER_BUFFERS`                  | `8 16k`                       |                                     |\n| `NGINX_LOG_FORMAT_OVERRIDE`                          |                               |                                     |\n| `NGINX_METRICS_ENABLED`                              | `off`                         |                                     |\n| `NGINX_METRICS_FORMAT`                               | `html`                        | html, json, jsonp, prometheus       |\n| `NGINX_METRICS_ALLOW_FROM`                           |                               |                                     |\n| `NGINX_MODSECURITY_ENABLED`                          |                               | See [ModSecurity]                   |\n| `NGINX_MODSECURITY_INBOUND_ANOMALY_SCORE_THRESHOLD`  | `7`                           |                                     |\n| `NGINX_MODSECURITY_OUTBOUND_ANOMALY_SCORE_THRESHOLD` | `7`                           |                                     |\n| `NGINX_MODSECURITY_POST_CORE_RULES`                  |                               | Location to rules loaded after CRS  |\n| `NGINX_MODSECURITY_PRE_CORE_RULES`                   |                               | Location to rules loaded before CRS |\n| `NGINX_MODSECURITY_USE_OWASP_CRS`                    |                               | See [ModSecurity]                   |\n| `NGINX_MULTI_ACCEPT`                                 | `on`                          |                                     |\n| `NGINX_NO_DEFAULT_HEADERS`                           |                               |                                     |\n| `NGINX_REAL_IP_HEADER`                               | `X-Real-IP`                   |                                     |\n| `NGINX_REAL_IP_RECURSIVE`                            | `off`                         |                                     |\n| `NGINX_RESET_TIMEDOUT_CONNECTION`                    | `off`                         |                                     |\n| `NGINX_SEND_TIMEOUT`                                 | `60s`                         |                                     |\n| `NGINX_SENDFILE`                                     | `on`                          |                                     |\n| `NGINX_SERVER_EXTRA_CONF_FILEPATH`                   |                               |                                     |\n| `NGINX_SERVER_NAME`                                  | `default`                     |                                     |\n| `NGINX_SERVER_ROOT`                                  | `/var/www/html`               |                                     |\n| `NGINX_SERVER_TOKENS`                                | `off`                         |                                     |\n| `NGINX_SET_REAL_IP_FROM`                             |                               |                                     |\n| `NGINX_SET_REAL_IPS_FROM`                            |                               | json array as string                |\n| `NGINX_STATIC_404_TRY_INDEX`                         |                               |                                     |\n| `NGINX_STATIC_ACCESS_LOG`                            | `off`                         |                                     |\n| `NGINX_STATIC_EXPIRES`                               | `1y`                          |                                     |\n| `NGINX_STATIC_MP4_BUFFER_SIZE`                       | `1M`                          |                                     |\n| `NGINX_STATIC_MP4_MAX_BUFFER_SIZE`                   | `5M`                          |                                     |\n| `NGINX_STATIC_OPEN_FILE_CACHE_ERRORS`                | `on`                          |                                     |\n| `NGINX_STATIC_OPEN_FILE_CACHE_MIN_USES`              | `2`                           |                                     |\n| `NGINX_STATIC_OPEN_FILE_CACHE_VALID`                 | `30s`                         |                                     |\n| `NGINX_STATIC_OPEN_FILE_CACHE`                       | `max=1000 inactive=30s`       |                                     |\n| `NGINX_STATIC_EXT_REGEX`                             | (see below)                   |                                     |\n| `NGINX_STATUS_ALLOW_FROM`                            |                               | e.g. `172.18.0.0/16`                |\n| `NGINX_STATUS_ENABLED`                               | `off`                         |                                     |\n| `NGINX_TCP_NODELAY`                                  | `on`                          |                                     |\n| `NGINX_TCP_NOPUSH`                                   | `on`                          |                                     |\n| `NGINX_TRACK_UPLOADS`                                | `uploads 60s`                 |                                     |\n| `NGINX_UNDERSCORES_IN_HEADERS`                       | `off`                         |                                     |\n| `NGINX_UPLOAD_PROGRESS`                              | `uploads 1m`                  |                                     |\n| `NGINX_USER`                                         | `nginx`                       |                                     |\n| `NGINX_VHOST_NO_DEFAULTS`                            |                               |                                     |\n| `NGINX_VHOST_PRESET`                                 | `html`                        |                                     |\n| `NGINX_WORKER_CONNECTIONS`                           | `1024`                        |                                     |\n| `NGINX_WORKER_PROCESSES`                             | `auto`                        |                                     |\n| `NGINX_WP_FILE_PROXY_URL`                            |                               | e.g. `http://dev.example.com`       |\n| `NGINX_WP_GOOGLE_XML_SITEMAP`                        |                               | See [WordPress]                     |\n| `NGINX_WP_YOAST_XML_SITEMAP`                         |                               | See [WordPress]                     |\n\nStatic files extension defined via the regex and can be overridden via the env var `NGINX_STATIC_EXT_REGEX`, default:\n\n```\ncss|cur|js|jpe?g|gif|htc|ico|png|xml|otf|ttf|eot|woff|woff2|svg|mp4|svgz|ogg|ogv|pdf|pptx?|zip|tgz|gz|rar|bz2|doc|xls|exe|tar|mid|midi|wav|bmp|rtf|txt|map|webp\n```\n\nSome environment variables can be overridden or added per [preset](#virtual-hosts-presets).\n\n## Build arguments\n\n| Argument         | Default value |\n|------------------|---------------|\n| `WODBY_GROUP_ID` | `1000`        |\n| `WODBY_USER_ID`  | `1000`        |\n\n## Nginx modules\n\n| Name                  | Version           | Dynamic |\n|-----------------------|-------------------|---------|\n| [brotli]              | [9aec15e]         |         |\n| [http_addition]       |                   |         |\n| [http_auth_request]   |                   |         |\n| [http_dav]            |                   |         |\n| [http_flv]            |                   |         |\n| [http_gunzip]         |                   |         |\n| [http_gzip_static]    |                   |         |\n| [http_image_filter]   |                   | ✓       |\n| http_modsecurity      | See [ModSecurity] | ✓       |\n| [http_mp4]            |                   |         |\n| [http_random_index]   |                   |         |\n| [http_realip]         |                   |         |\n| [http_secure_link]    |                   |         |\n| [http_slice]          |                   |         |\n| [http_ssl]            |                   |         |\n| [http_stub_status]    |                   |         |\n| [http_sub]            |                   |         |\n| [http_uploadprogress] | 0.9.1             |         |\n| [http_v2]             |                   |         |\n| [http_xslt]           |                   | ✓       |\n| [mail_ssl]            |                   |         |\n| [stream_realip]       |                   |         |\n| [stream_ssl]          |                   |         |\n| [stream_ssl_preread]  |                   |         |\n| [vts]                 | [3c6cf41]         |         |\n\n### ModSecurity\n\n| Component                  | Version |\n|----------------------------|---------|\n| [ModSecurity Nginx module] | 1.0.0   |\n| [ModSecurity Library]      | 3.0.3   |\n| [OWASP CRS]                | 3.1.0   |\n\nCompiled as a dynamic module, disabled by default. To enable set `$NGINX_MODSECURITY_ENABLED` to any value.\nAdditionally, you can enable [OWASP Core Rule Set (CRS)](https://modsecurity.org/crs/) by\nsetting `$NGINX_MODSECURITY_USE_OWASP_CRS` to any value, ️be wary since it\nmay [block some requests](https://github.com/wodby/nginx/pull/14#issuecomment-447404035) with the default configuration.\nSee env vars starting with `$NGINX_MODSECURITY_` for advanced configuration.\n\n## Default behavior\n\nApplied to all presets by default, can be disabled via `$NGINX_VHOST_NO_DEFAULTS`:\n\n- `/.well-known/` location supported\n- `/ads.txt` allowed\n- `/robots.txt` allowed\n- `/humans.txt` allowed\n- `/favicon.ico` allowed\n- `.flv`, `.m4a`, `.mp4`, `.mov` locations supported and handled with appropriate modules\n- `/.healthz` location supported, requests not shown in access log\n\n## Customization\n\n- Pass real IP from a reverse proxy via `$NGINX_SET_REAL_IP_FROM`, e.g. `172.17.0.0/16` for docker network\n- Pass multiple real IP from reverse proxies via `$NGINX_SET_REAL_IPS_FROM`\n  In a `compose.yml` this can be done like this:\n  ```\n  environment:\n    NGINX_SET_REAL_IPS_FROM: \"[\\\"172.17.0.0/16\\\", \\\"192.168.0.10\\\"]\"\n\n  environment:\n    NGINX_SET_REAL_IPS_FROM: |-\n      [\"172.17.0.0/16\", \"192.168.0.10\"]\n  ```\n- Customize the header which value will be used to replace the client address via `$NGINX_REAL_IP_HEADER`\n- Default recommended headers can be disabled via `$NGINX_NO_DEFAULT_HEADERS` (defined in `nginx.conf`)\n- The value for the Content-Security-Policy header can be changed using `$NGINX_HEADERS_CONTENT_SECURITY_POLICY`, it's\n  default value is `frame-ancestors: 'none'`. More information on this header can be\n  found [here](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy).\n- Error page file can be customized for HTTP errors `403` (`$NGINX_ERROR_403_URI`) and `404` (`$NGINX_ERROR_404_URI`)\n- Default error page for HTTP errors `500`, `502`, `503`, `504` can be disabled via `$NGINX_HIDE_50x_ERRORS`\n- Access to hidden files (starting with `.`) can be allowed via `$NGINX_ALLOW_ACCESS_HIDDEN_FILES`\n- Caching can be disabled via `$NGINX_DISABLE_CACHING`\n- Add extra locations via `$NGINX_SERVER_EXTRA_CONF_FILEPATH=/filepath/to/nginx-locations.conf`, the file will be\n  included at the end of default rules (`server` context)\n- Completely override include of the virtual host config by overriding `NGINX_CONF_INCLUDE`, it will be included\n  in `nginx.conf`\n- Define [custom preset](#custom-preset)\n- Status page `/.statusz` can be enabled via `$NGINX_STATUS_ENABLED`, requests not shown in access log\n- Metrics page `/.metricsz` can be enabled via `$NGINX_METRICS_ENABLED`, requests not shown in access log\n- Metrics page format can be customized via `$NGINX_METRICS_FORMAT`, supports json, html, jsonp and prometheus\n\n## Virtual hosts presets\n\nVirtual host preset `html` will be used by default, you can change it via env var `$NGINX_VHOST_PRESET`. The list of\navailable presets:\n\n### HTML\n\n- [Preset template](https://github.com/wodby/nginx/blob/master/templates/presets/html.conf.tmpl)\n- Usage: this preset selected by default\n\nOverridden default values:\n\n| Variable           | Default Value |\n|--------------------|---------------|\n| `NGINX_INDEX_FILE` | `index.html`  |\n\n### HTTP proxy (application server)\n\n- [Preset template](https://github.com/wodby/nginx/blob/master/templates/presets/http-proxy.conf.tmpl)\n- Usage: add `NGINX_VHOST_PRESET=http-proxy` and `NGINX_BACKEND_HOST=[HOST]`\n\nOverridden default values:\n\n| Variable             | Default Value |\n|----------------------|---------------|\n| `NGINX_BACKEND_HOST` |               |\n| `NGINX_BACKEND_PORT` | `8080`        |\n\n### Django\n\nSame as HTTP proxy but with additional media/static locations for Django.\n\n- [Preset template](https://github.com/wodby/nginx/blob/master/templates/presets/django.conf.tmpl)\n- Usage: add `NGINX_VHOST_PRESET=django`\n\nOverridden default values:\n\n| Variable             | Default Value |\n|----------------------|---------------|\n| `NGINX_BACKEND_HOST` | `python`      |\n| `NGINX_BACKEND_PORT` | `8080`        |\n\n### PHP-based (FastCGI)\n\nOverridden default values:\n\n| Variable             | Default Value |\n|----------------------|---------------|\n| `NGINX_BACKEND_HOST` | `php`         |\n| `NGINX_BACKEND_PORT` | `9000`        |\n\n#### PHP\n\n* [Preset template](https://github.com/wodby/nginx/blob/master/templates/presets/php.conf.tmpl)\n* Usage: add `NGINX_VHOST_PRESET=php`, optionally modify `NGINX_BACKEND_HOST`\n\nOverridden default values:\n\n| Variable           | Default Value          |\n|--------------------|------------------------|\n| `NGINX_INDEX_FILE` | `index.php index.html` |\n\n#### Laravel\n\n* [Preset template](https://github.com/wodby/nginx/blob/master/templates/presets/laravel.conf.tmpl)\n* Usage: add `NGINX_VHOST_PRESET=laravel`, optionally modify `NGINX_BACKEND_HOST`\n\nOverridden default values:\n\n| Variable           | Default Value          |\n|--------------------|------------------------|\n| `NGINX_INDEX_FILE` | `index.php index.html` |\n\n#### WordPress\n\n- [Preset template](https://github.com/wodby/nginx/blob/master/templates/presets/wordpress.conf.tmpl)\n- Usage: add `NGINX_VHOST_PRESET=wordpress`, optionally modify `NGINX_BACKEND_HOST`\n- Access to `*.txt` files allowed only if they are located in uploads directory\n- Access to `/wp-content/uploads/woocommerce_uploads` disallowed\n- Dynamic generated `/robots.txt` supported\n- Supports `/wp-sitemap.xml` endpoint\n- Alternative `sitemap.xml` endpoints:\n    - For plugin [Google XML Sitemap](https://wordpress.org/plugins/google-sitemap-generator/)\n      add `$NGINX_WP_GOOGLE_XML_SITEMAP=1`\n    - For plugin [Yoast SEO](https://kb.yoast.com/kb/xml-sitemaps-nginx/) add `$NGINX_WP_YOAST_XML_SITEMAP=1`\n- Default value of `NGINX_HEADERS_CONTENT_SECURITY_POLICY` overridden to `frame-ancestors: 'self'`\n\nDefault value of NGINX_WP_NOT_FOUND_REGEX (backspaces must be escaped) is: `.+\\\\.(?:txt|md|pot|sh|.*sql?)|(?:composer\\\\.(json|lock)|(package|package-lock)\\\\.json|yarn\\\\.lock)$`\n\n#### Drupal\n\n- Preset templates: [Drupal 11], [Drupal 10], [Drupal 9], [Drupal 8], [Drupal 7]\n- Usage: add `NGINX_VHOST_PRESET=` with the value of `drupal11`, `drupal10`, `drupal9`, `drupal8` or `drupal7`. Optionally\n  modify `NGINX_BACKEND_HOST`\n- If you want to use [stage_file_proxy](https://www.drupal.org/project/stage_file_proxy) module,\n  set `$NGINX_STATIC_404_TRY_INDEX=1` to redirect 404 static files requests to Drupal\n- Access to `.txt` (can be overridden via `NGINX_DRUPAL_FILES_STATIC_EXT_REGEX`) files allowed only if they are located in files directory\n- Access to certs extensions gives 404 based on the value of `$NGINX_DRUPAL_NOT_FOUND_REGEX`\n- Default value of `NGINX_HEADERS_CONTENT_SECURITY_POLICY` overridden to `frame-ancestors: 'self'`\n\nDefault value of `NGINX_DRUPAL_NOT_FOUND_REGEX` (backspaces must be escaped) is taken from Drupal's `.htaccess` and\ndepends on the Drupal version:\n\nDrupal 11/10/9/8:\n\n```\n\\\\.(engine|md|txt|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\\\\.php)?|xtmpl|yml|yaml)(~|\\\\.sw[op]|\\\\.bak|\\\\.orig|\\\\.save)?$|^(\\\\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template)$|(web\\\\.config|composer\\\\.(json|lock)|(package|package-lock)\\\\.json|yarn\\\\.lock)$|^#.*#$|\\\\.php(~|\\\\.sw[op]|\\\\.bak|\\\\.orig|\\\\.save)$\n```\n\nDrupal 7:\n\n```\n\\\\.(engine|txt|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\\\\.php)?|xtmpl|yml|yaml)(~|\\\\.sw[op]|\\\\.bak|\\\\.orig|\\\\.save)?$|^(\\\\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\\\\.(json|lock)|(package|package-lock)\\\\.json|yarn\\\\.lock)$|^#.*#$|\\\\.php(~|\\\\.sw[op]|\\\\.bak|\\\\.orig\\\\.save)$\n```\n\n[Drupal 11]: https://github.com/wodby/nginx/blob/master/templates/presets/drupal11.conf.tmpl\n\n[Drupal 10]: https://github.com/wodby/nginx/blob/master/templates/presets/drupal10.conf.tmpl\n\n[Drupal 9]: https://github.com/wodby/nginx/blob/master/templates/presets/drupal9.conf.tmpl\n\n[Drupal 8]: https://github.com/wodby/nginx/blob/master/templates/presets/drupal8.conf.tmpl\n\n[Drupal 7]: https://github.com/wodby/nginx/blob/master/templates/presets/drupal7.conf.tmpl\n\n#### Matomo\n\nBased on https://github.com/matomo-org/matomo-nginx\n\nThe default value of `NGINX_STATIC_EXT_REGEX` overridden:\n\n```\ncss|cur|js|jpe?g|gif|htc|ico|png|xml|otf|ttf|eot|woff|woff2|svg|mp4|svgz|ogg|ogv|pdf|pptx?|zip|tgz|gz|rar|bz2|doc|xls|exe|tar|mid|midi|wav|bmp|rtf|txt|map|webp|json|html\n```\n\n#### Custom preset\n\nYou can use a custom by preset by mounting your preset to `/etc/gotpl/presets/[my-preset-name].conf.tmpl` and\nsetting `$NGINX_VHOST_PRESET=[my-preset-name]`.\n\n#### No preset\n\nTo disable presets set `$NGINX_VHOST_PRESET=\"\"`\n\n## Maintenance\n\nUpdates to Nginx and base image automated via [wodby/images](https://github.com/wodby/images).\n\n## Orchestration actions\n\nUsage:\n\n```\nmake COMMAND [params ...]\n\ncommands:\n    init\n    git-checkout [target is_hash]\n    check-ready [host max_try wait_seconds delay_seconds]\n\ndefault params values:\n    host localhost\n    max_try 1\n    wait_seconds 1\n    delay_seconds 0\n```\n\n[brotli]: https://github.com/google/ngx_brotli\n\n[http_addition]: http://nginx.org/en/docs/http/ngx_http_addition_module.html\n\n[http_auth_request]: http://nginx.org/en/docs/http/ngx_http_auth_request_module.html\n\n[http_dav]: http://nginx.org/en/docs/http/ngx_http_dav_module.html\n\n[http_flv]: http://nginx.org/en/docs/http/ngx_http_flv_module.html\n\n[http_gunzip]: http://nginx.org/en/docs/http/ngx_http_gunzip_module.html\n\n[http_gzip_static]: http://nginx.org/en/docs/http/ngx_http_gzip_static_module.html\n\n[http_image_filter]: http://nginx.org/en/docs/http/ngx_http_image_filter_module.html\n\n[http_mp4]: http://nginx.org/en/docs/http/ngx_http_mp4_module.html\n\n[http_random_index]: http://nginx.org/en/docs/http/ngx_http_random_index_module.html\n\n[http_realip]: http://nginx.org/en/docs/http/ngx_http_realip_module.html\n\n[http_secure_link]: http://nginx.org/en/docs/http/ngx_http_secure_link_module.html\n\n[http_slice]: http://nginx.org/en/docs/http/ngx_http_slice_module.html\n\n[http_ssl]: http://nginx.org/en/docs/http/ngx_http_ssl_module.html\n\n[http_stub_status]: http://nginx.org/en/docs/http/ngx_http_stub_status_module.html\n\n[http_sub]: http://nginx.org/en/docs/http/ngx_http_sub_module.html\n\n[http_uploadprogress]: https://github.com/masterzen/nginx-upload-progress-module\n\n[http_v2]: http://nginx.org/en/docs/http/ngx_http_v2_module.html\n\n[http_xslt]: http://nginx.org/en/docs/http/ngx_http_xslt_module.html\n\n[mail_ssl]: http://nginx.org/en/docs/mail/ngx_mail_ssl_module.html\n\n[ModSecurity Library]: https://modsecurity.org/\n\n[ModSecurity Nginx module]: https://github.com/SpiderLabs/ModSecurity-nginx\n\n[ModSecurity]: #modsecurity\n\n[OWASP CRS]: https://modsecurity.org/crs/\n\n[WordPress]: #wordpress\n\n[stream_realip]: http://nginx.org/en/docs/stream/ngx_stream_realip_module.html\n\n[stream_ssl]: http://nginx.org/en/docs/stream/ngx_stream_ssl_module.html\n\n[stream_ssl_preread]: http://nginx.org/en/docs/stream/ngx_stream_ssl_preread_module.html\n\n[vts]: https://github.com/vozlt/nginx-module-vts\n\n[9aec15e]: https://github.com/google/ngx_brotli/commit/9aec15e2aa6feea2113119ba06460af70ab3ea62\n[3c6cf41]: https://github.com/vozlt/nginx-module-vts/commit/3c6cf41315bfcb48c35a3a0be81ddba6d0d01dac\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwodby%2Fnginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwodby%2Fnginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwodby%2Fnginx/lists"}