|
@@ -18,6 +18,11 @@ server {
|
|
|
access_log /var/log/nginx/access.log;
|
|
|
root /web;
|
|
|
|
|
|
+ location ^~ /.well-known/acme-challenge/ {
|
|
|
+ allow all;
|
|
|
+ default_type "text/plain";
|
|
|
+ }
|
|
|
+
|
|
|
# If behind reverse proxy, forwards the correct IP
|
|
|
set_real_ip_from 172.22.1.1;
|
|
|
real_ip_header X-Forwarded-For;
|
|
@@ -58,12 +63,20 @@ server {
|
|
|
deny all;
|
|
|
}
|
|
|
|
|
|
- if ($host ~* autodiscover\.(.*)) {
|
|
|
- rewrite ^(.*) /autodiscover.php last;
|
|
|
+ location ~ /(?:a|A)utodiscover/(?:a|A)utodiscover.xml {
|
|
|
+ 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\.(.*)) {
|
|
|
- rewrite ^(.*) /autoconfig.php last;
|
|
|
+ location ~ /(?:m|M)ail/(?:c|C)onfig-v1.1.xml {
|
|
|
+ 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 {
|
|
@@ -153,6 +166,11 @@ server {
|
|
|
access_log /var/log/nginx/access.log;
|
|
|
root /web;
|
|
|
|
|
|
+ location ^~ /.well-known/acme-challenge/ {
|
|
|
+ allow all;
|
|
|
+ default_type "text/plain";
|
|
|
+ }
|
|
|
+
|
|
|
# If behind reverse proxy, forwards the correct IP
|
|
|
set_real_ip_from 172.22.1.1;
|
|
|
real_ip_header X-Forwarded-For;
|
|
@@ -193,12 +211,20 @@ server {
|
|
|
deny all;
|
|
|
}
|
|
|
|
|
|
- if ($host ~* autodiscover\.(.*)) {
|
|
|
- rewrite ^(.*) /autodiscover.php last;
|
|
|
+ location ~ /(?:a|A)utodiscover/(?:a|A)utodiscover.xml {
|
|
|
+ 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\.(.*)) {
|
|
|
- rewrite ^(.*) /autoconfig.php last;
|
|
|
+ location ~ /(?:m|M)ail/(?:c|C)onfig-v1.1.xml {
|
|
|
+ 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 {
|