Change Nginx templates

master
andryyy 2017-02-28 10:12:18 +01:00
parent 2fea636a01
commit 6d7c3423ba
6 changed files with 9 additions and 5 deletions

View File

@ -0,0 +1 @@
server_name logs.servercow.de autodiscover.* autoconfig.*;

View File

@ -13,7 +13,7 @@ server {
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains"; add_header Strict-Transport-Security "max-age=15768000; includeSubDomains";
ssl_ecdh_curve secp384r1; ssl_ecdh_curve secp384r1;
index index.php index.html; index index.php index.html;
server_name _ autodiscover.* autoconfig.*; include /etc/nginx/conf.d/server_name.active;
error_log /var/log/nginx/error.log; error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log; access_log /var/log/nginx/access.log;
root /web; root /web;
@ -148,7 +148,7 @@ server {
charset utf-8; charset utf-8;
override_charset on; override_charset on;
index index.php index.html; index index.php index.html;
server_name _ autodiscover.* autoconfig.*; include /etc/nginx/conf.d/server_name.active;
error_log /var/log/nginx/error.log; error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log; access_log /var/log/nginx/access.log;
root /web; root /web;

View File

@ -0,0 +1 @@
server_name ${MAILCOW_HOSTNAME} autodiscover.* autoconfig.*;

View File

@ -242,12 +242,14 @@ services:
- sogo-mailcow - sogo-mailcow
- php-fpm-mailcow - php-fpm-mailcow
image: nginx:mainline image: nginx:mainline
command: /bin/bash -c "envsubst < /etc/nginx/conf.d/listen_plain.template > /etc/nginx/conf.d/listen_plain.active && command: /bin/bash -c "envsubst < /etc/nginx/conf.d/templates/listen_plain.template > /etc/nginx/conf.d/listen_plain.active &&
envsubst < /etc/nginx/conf.d/listen_ssl.template > /etc/nginx/conf.d/listen_ssl.active && envsubst < /etc/nginx/conf.d/templates/listen_ssl.template > /etc/nginx/conf.d/listen_ssl.active &&
envsubst < /etc/nginx/conf.d/templates/server_name.template > /etc/nginx/conf.d/server_name.active &&
nginx -g 'daemon off;'" nginx -g 'daemon off;'"
environment: environment:
- HTTPS_PORT=${HTTPS_PORT:-443} - HTTPS_PORT=${HTTPS_PORT:-443}
- HTTP_PORT=${HTTP_PORT:-80} - HTTP_PORT=${HTTP_PORT:-80}
- MAILCOW_HOSTNAME=${MAILCOW_HOSTNAME}
volumes: volumes:
- ./data/web:/web:ro - ./data/web:/web:ro
- ./data/conf/rspamd/dynmaps:/dynmaps:ro - ./data/conf/rspamd/dynmaps:/dynmaps:ro