location /Microsoft-Server-ActiveSync {
  alias       /usr/share/grommunio-sync/index.php;
  access_log  /var/log/nginx/nginx-sync-access.log;
  error_log   /var/log/nginx/nginx-sync-error.log;

  include fastcgi_params;
  fastcgi_param REMOTE_USER "";
  fastcgi_index index.php;
  fastcgi_param SCRIPT_FILENAME $document_root$1;
  fastcgi_param PHP_FLAG "
    magic_quotes_gpc=off
    register_globals=off
    magic_quotes_runtime=off
    short_open_tag=on
  ";
  fastcgi_param PHP_VALUE "
    memory_limit=500M
    post_max_size=102M
    upload_max_filesize=100M
    max_execution_time=3660
    zend.exception_ignore_args=On
    zend.exception_string_param_max_len=0
  ";
  fastcgi_param HTTP_PROXY "";
  fastcgi_read_timeout 3660;

  client_max_body_size 102m;
  client_body_buffer_size 128k;
  fastcgi_pass fpm_sync;
  include /etc/nginx/conf.d/grommunio_sync-*.conf.include;
}
