Hi Manfred,
thanks again for your help. And I’m sorry for the late reply.
I checked my nginx config files again. I made a huge mistake when combining the webapp and z-push configuration because my webserver listens only to one domain.
So the php-fpm configuration was wrong inside the combined configuration file. After fixing this AutoDiscovery and ActiveSync works both fine.
For those few who need exactly this or a similar configuration, here are the modifications I made (even if those are not ideal):
Add the following lines to the end your webapp configuration:
location /Microsoft-Server-ActiveSync {
# If you're using PHP-FPM uncomment the following lines.
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REQUEST_URI $1;
fastcgi_param PHP_FLAG "magic_quotes_gpc=off \n register_globals=off \n magic_quotes_runtime=off \n short_open_tag=on";
fastcgi_param PHP_VALUE "post_max_size=20M \n upload_max_filesize=20M \n max_execution_time=3660";
fastcgi_param HTTP_PROXY ""; # Mitigate https://httpoxy.org/ vulnerabilities
fastcgi_read_timeout 3660; # Z-Push Ping might run 3600s, but to be safe
alias /usr/share/z-push/index.php;
access_log /var/log/nginx/z-push-access.log;
error_log /var/log/nginx/z-push-error.log;
# Attachments ca 15MB max (since binary data needs to be base64 encoded in mine, which results in in about 33% overhead)
client_max_body_size 20m;
client_body_buffer_size 128k;
# Select one of the fastcgi_pass values or adapt to your configuration
include snippets/z-push-php.conf;
}
location /AutoDiscover/AutoDiscover.xml {
# If you're using PHP-FPM uncomment the following lines.
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REQUEST_URI $1;
fastcgi_param PHP_FLAG "magic_quotes_gpc=off \n register_globals=off \n magic_quotes_runtime=off \n short_open_tag=on";
fastcgi_param PHP_VALUE "post_max_size=20M \n upload_max_filesize=20M \n max_execution_time=3660";
include snippets/z-push-autodiscover.conf;
include snippets/z-push-php.conf;
}
location /Autodiscover/Autodiscover.xml {
# If you're using PHP-FPM uncomment the following lines.
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REQUEST_URI $1;
fastcgi_param PHP_FLAG "magic_quotes_gpc=off \n register_globals=off \n magic_quotes_runtime=off \n short_open_tag=on";
fastcgi_param PHP_VALUE "post_max_size=20M \n upload_max_filesize=20M \n max_execution_time=3660";
fastcgi_param HTTP_PROXY ""; # Mitigate https://httpoxy.org/ vulnerabilities
fastcgi_read_timeout 3660; # Z-Push Ping might run 3600s, but to be safe
include snippets/z-push-autodiscover.conf;
include snippets/z-push-php.conf;
}
location /autodiscover/autodiscover.xml {
# If you're using PHP-FPM uncomment the following lines.
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REQUEST_URI $1;
fastcgi_param PHP_FLAG "magic_quotes_gpc=off \n register_globals=off \n magic_quotes_runtime=off \n short_open_tag=on";
fastcgi_param PHP_VALUE "post_max_size=20M \n upload_max_filesize=20M \n max_execution_time=3660";
fastcgi_param HTTP_PROXY ""; # Mitigate https://httpoxy.org/ vulnerabilities
fastcgi_read_timeout 3660; # Z-Push Ping might run 3600s, but to be safe
include snippets/z-push-autodiscover.conf;
include snippets/z-push-php.conf;
}
And don’t forget to configure your php-fpm settings in /etc/nginx/snippets/z-push-php.conf …I heared that some modules don’t work if you forget this…
And thanks again to @Manfred for the help