mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-01-12 04:23:24 +02:00
Better autodiscover/autoconfig config in Nginx, add new ignores
This commit is contained in:
parent
6d7c3423ba
commit
50eb49ab71
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,4 +5,5 @@ mailcow.conf
|
|||||||
mailcow.conf_backup
|
mailcow.conf_backup
|
||||||
data/conf/nginx/listen_ssl.active
|
data/conf/nginx/listen_ssl.active
|
||||||
data/conf/nginx/listen_plain.active
|
data/conf/nginx/listen_plain.active
|
||||||
|
data/conf/nginx/server_name.active
|
||||||
data/web/inc/vars.local.inc.php
|
data/web/inc/vars.local.inc.php
|
||||||
|
@ -18,6 +18,11 @@ server {
|
|||||||
access_log /var/log/nginx/access.log;
|
access_log /var/log/nginx/access.log;
|
||||||
root /web;
|
root /web;
|
||||||
|
|
||||||
|
location ^~ /.well-known/acme-challenge/ {
|
||||||
|
allow all;
|
||||||
|
default_type "text/plain";
|
||||||
|
}
|
||||||
|
|
||||||
# If behind reverse proxy, forwards the correct IP
|
# If behind reverse proxy, forwards the correct IP
|
||||||
set_real_ip_from 172.22.1.1;
|
set_real_ip_from 172.22.1.1;
|
||||||
real_ip_header X-Forwarded-For;
|
real_ip_header X-Forwarded-For;
|
||||||
@ -58,12 +63,20 @@ server {
|
|||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($host ~* autodiscover\.(.*)) {
|
location ~ /(?:a|A)utodiscover/(?:a|A)utodiscover.xml {
|
||||||
rewrite ^(.*) /autodiscover.php last;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
|
fastcgi_pass phpfpm:9000;
|
||||||
|
include /etc/nginx/fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
try_files /autodiscover.php =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($host ~* autoconfig\.(.*)) {
|
location ~ /(?:m|M)ail/(?:c|C)onfig-v1.1.xml {
|
||||||
rewrite ^(.*) /autoconfig.php last;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
|
fastcgi_pass phpfpm:9000;
|
||||||
|
include /etc/nginx/fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
try_files /autoconfig.php =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ^~ /Microsoft-Server-ActiveSync {
|
location ^~ /Microsoft-Server-ActiveSync {
|
||||||
@ -153,6 +166,11 @@ server {
|
|||||||
access_log /var/log/nginx/access.log;
|
access_log /var/log/nginx/access.log;
|
||||||
root /web;
|
root /web;
|
||||||
|
|
||||||
|
location ^~ /.well-known/acme-challenge/ {
|
||||||
|
allow all;
|
||||||
|
default_type "text/plain";
|
||||||
|
}
|
||||||
|
|
||||||
# If behind reverse proxy, forwards the correct IP
|
# If behind reverse proxy, forwards the correct IP
|
||||||
set_real_ip_from 172.22.1.1;
|
set_real_ip_from 172.22.1.1;
|
||||||
real_ip_header X-Forwarded-For;
|
real_ip_header X-Forwarded-For;
|
||||||
@ -193,12 +211,20 @@ server {
|
|||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($host ~* autodiscover\.(.*)) {
|
location ~ /(?:a|A)utodiscover/(?:a|A)utodiscover.xml {
|
||||||
rewrite ^(.*) /autodiscover.php last;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
|
fastcgi_pass phpfpm:9000;
|
||||||
|
include /etc/nginx/fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
try_files /autodiscover.php =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($host ~* autoconfig\.(.*)) {
|
location ~ /(?:m|M)ail/(?:c|C)onfig-v1.1.xml {
|
||||||
rewrite ^(.*) /autoconfig.php last;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
|
fastcgi_pass phpfpm:9000;
|
||||||
|
include /etc/nginx/fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
try_files /autoconfig.php =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ^~ /Microsoft-Server-ActiveSync {
|
location ^~ /Microsoft-Server-ActiveSync {
|
||||||
|
Loading…
Reference in New Issue
Block a user