#sub_path_only rewrite ^Microsoft-Server-ActiveSync$ Microsoft-Server-ActiveSync/ permanent; rewrite ^/$ Microsoft-Server-ActiveSync/ permanent; location /Microsoft-Server-ActiveSync/ { # Path to source alias __INSTALL_DIR__/; index index.php; # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file client_max_body_size 50M; try_files $uri $uri/ index.php; rewrite ^(.*)$ /Microsoft-Server-ActiveSync/index.php last; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param HTTPS on; fastcgi_read_timeout 630; fastcgi_param SCRIPT_FILENAME $request_filename; } # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; } location /AutoDiscover/AutoDiscover.xml { alias __INSTALL_DIR__/autodiscover/autodiscover.php; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; include fastcgi_params; fastcgi_param HTTPS on; fastcgi_param SCRIPT_FILENAME $request_filename; } location /Autodiscover/Autodiscover.xml { alias __INSTALL_DIR__/autodiscover/autodiscover.php; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; include fastcgi_params; fastcgi_param HTTPS on; fastcgi_param SCRIPT_FILENAME $request_filename; } location /autodiscover/autodiscover.xml { alias __INSTALL_DIR__/autodiscover/autodiscover.php; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; include fastcgi_params; fastcgi_param HTTPS on; fastcgi_param SCRIPT_FILENAME $request_filename; }