soporte argumentos para listen
This commit is contained in:
parent
e97e40e318
commit
999e91e220
15
README.md
15
README.md
@ -46,6 +46,21 @@ Genera la siguiente estructura de directorio para configurar nginx:
|
|||||||
* `nginx_redirect_https`: indica si forzar redireccion a https.
|
* `nginx_redirect_https`: indica si forzar redireccion a https.
|
||||||
Valor por defecto: `yes`.
|
Valor por defecto: `yes`.
|
||||||
|
|
||||||
|
* `nginx_https_listen_args`: array con argumentos extra para la
|
||||||
|
directiva `listen` que escucha en el puerto 443.
|
||||||
|
Ver valores posibles en la [documentación oficial](listen).
|
||||||
|
*No especificar la opción `ssl`, esta ya viene implícita.*
|
||||||
|
Por ejemplo: para activar http2, usar el valor `['http2']`.
|
||||||
|
Valor por defecto: `[]` (sin args extra).
|
||||||
|
|
||||||
|
* `nginx_http_listen_args`: array con argumentos extra para la
|
||||||
|
directiva `listen` que escucha en el puerto 80. Ver valores posibles
|
||||||
|
en la [documentación oficial](listen).
|
||||||
|
Por ejemplo: para activar http2, usar el valor `['http2']`.
|
||||||
|
Valor por defecto: `[]` (sin args extra).
|
||||||
|
|
||||||
|
[listen]: https://nginx.org/en/docs/http/ngx_http_core_module.html#listen
|
||||||
|
|
||||||
## Variables exportadas
|
## Variables exportadas
|
||||||
|
|
||||||
* `nginx_config_mountpoint`: punto de montaje de la configuración de nginx.
|
* `nginx_config_mountpoint`: punto de montaje de la configuración de nginx.
|
||||||
|
@ -19,3 +19,7 @@ nginx_publish_ports:
|
|||||||
|
|
||||||
# forzar redireccion a https?
|
# forzar redireccion a https?
|
||||||
nginx_redirect_https: yes
|
nginx_redirect_https: yes
|
||||||
|
|
||||||
|
# argumentos extra para las directivas 'listen'
|
||||||
|
nginx_http_listen_args: []
|
||||||
|
nginx_https_listen_args: []
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
- copy:
|
- copy:
|
||||||
content: |
|
content: |
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80 {{ nginx_http_listen_args | join (' ') }};
|
||||||
server_name _;
|
server_name _;
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
include /etc/nginx/conf.d/common/*.conf;
|
include /etc/nginx/conf.d/common/*.conf;
|
||||||
@ -56,7 +56,7 @@
|
|||||||
include /etc/nginx/conf.d/locations-http/*.conf;
|
include /etc/nginx/conf.d/locations-http/*.conf;
|
||||||
}
|
}
|
||||||
server {
|
server {
|
||||||
listen 443 ssl;
|
listen 443 ssl {{ nginx_https_listen_args | join (' ') }};
|
||||||
server_name _;
|
server_name _;
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
include /etc/nginx/conf.d/common/*.conf;
|
include /etc/nginx/conf.d/common/*.conf;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user