first
This commit is contained in:
commit
5aa7d034f7
3292 changed files with 465160 additions and 0 deletions
2
data/conf/nginx/templates/listen_plain.template
Executable file
2
data/conf/nginx/templates/listen_plain.template
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
listen ${HTTP_PORT};
|
||||
listen [::]:${HTTP_PORT};
|
||||
3
data/conf/nginx/templates/listen_ssl.template
Executable file
3
data/conf/nginx/templates/listen_ssl.template
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
listen ${HTTPS_PORT} ssl;
|
||||
listen [::]:${HTTPS_PORT} ssl;
|
||||
http2 on;
|
||||
1
data/conf/nginx/templates/server_name.template.sh
Executable file
1
data/conf/nginx/templates/server_name.template.sh
Executable file
|
|
@ -0,0 +1 @@
|
|||
echo "server_name ${MAILCOW_HOSTNAME} autodiscover.* autoconfig.* $(echo ${ADDITIONAL_SERVER_NAMES} | tr ',' ' ');"
|
||||
38
data/conf/nginx/templates/sites.template.sh
Executable file
38
data/conf/nginx/templates/sites.template.sh
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
echo '
|
||||
server {
|
||||
listen 127.0.0.1:65510;
|
||||
include /etc/nginx/conf.d/listen_plain.active;
|
||||
include /etc/nginx/conf.d/listen_ssl.active;
|
||||
|
||||
ssl_certificate /etc/ssl/mail/cert.pem;
|
||||
ssl_certificate_key /etc/ssl/mail/key.pem;
|
||||
|
||||
include /etc/nginx/conf.d/server_name.active;
|
||||
|
||||
include /etc/nginx/conf.d/includes/site-defaults.conf;
|
||||
}
|
||||
';
|
||||
for cert_dir in /etc/ssl/mail/*/ ; do
|
||||
if [[ ! -f ${cert_dir}domains ]] || [[ ! -f ${cert_dir}cert.pem ]] || [[ ! -f ${cert_dir}key.pem ]]; then
|
||||
continue
|
||||
fi
|
||||
# do not create vhost for default-certificate. the cert is already in the default server listen
|
||||
domains="$(cat ${cert_dir}domains | sed -e 's/^[[:space:]]*//')"
|
||||
case "${domains}" in
|
||||
"") continue;;
|
||||
"${MAILCOW_HOSTNAME}"*) continue;;
|
||||
esac
|
||||
echo -n '
|
||||
server {
|
||||
include /etc/nginx/conf.d/listen_ssl.active;
|
||||
|
||||
ssl_certificate '${cert_dir}'cert.pem;
|
||||
ssl_certificate_key '${cert_dir}'key.pem;
|
||||
';
|
||||
echo -n '
|
||||
server_name '${domains}';
|
||||
|
||||
include /etc/nginx/conf.d/includes/site-defaults.conf;
|
||||
}
|
||||
';
|
||||
done
|
||||
1
data/conf/nginx/templates/sogo.template
Executable file
1
data/conf/nginx/templates/sogo.template
Executable file
|
|
@ -0,0 +1 @@
|
|||
proxy_pass http://${IPV4_NETWORK}.248:20000;
|
||||
5
data/conf/nginx/templates/sogo_eas.template.sh
Executable file
5
data/conf/nginx/templates/sogo_eas.template.sh
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
if printf "%s\n" "${SKIP_SOGO}" | grep -E '^([yY][eE][sS]|[yY])+$' >/dev/null; then
|
||||
echo "return 410;"
|
||||
else
|
||||
echo "proxy_pass http://${IPV4_NETWORK}.248:20000/SOGo/Microsoft-Server-ActiveSync;"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue