Configuring web server

If you specify ActiveServer hostname (e.g. sync.domain.com) when configuring your email client, the client will actually access the server via URL of the following kind:

sync.domain.com/Microsoft-Server-ActiveSync

So it's important to reconfigure web server so that such URL is redirected to index.php file of your ActiveServer installation.

Below, we provide configuration samples for Apache and nginx webservers. The idea is setting up alias for /Microsoft-Server-ActiveSync.

Apache configuration

# ActiveSync default Apache configuration
<IfModule mod_alias.c>
    Alias /Microsoft-Server-ActiveSync /usr/share/activeserver/index.php
</IfModule>

If you're using PHP-FPM, authorization headers may not be sent through by default. To correct that, add the following directive to .htaccess file or virtual host configuration:

RewriteEngine on
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

Nginx configuration

server {
...
    location ~* /Microsoft-Server-ActiveSync {
        alias /var/www/activeserver/index.php;
        include /etc/nginx/fastcgi.conf;
        fastcgi_read_timeout 3660;
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
    }
...