WebMail Pro 8 documentation

Configuring DAV server


WebMail Pro 8 uses DAV server internally, for storing data and syncing it with mobile and other clients. Typically, it will work out of the box, but you might need to perform additional reconfiguration, depending on your needs and specific environment.

By default, URL used for DAV sync is not supplied in product configuration. Standard URL would look like http://www.yourdomain.com/aurora/dav.php/ (with the trailing slash required), where http://www.yourdomain.com/aurora/ is URL pointing to WebMail Pro 8 installation. For this to work with Apache, you might need to recheck that AcceptPathInfo is not disabled in Apache configuration.

It is strongly advised to configure your web server so that URLs are rewritten and easier to enter from, say, mobile device.

Configuring Apache

For Apache web server, URL rewriting is ensured by adding virtual host with the following configuration:

DocumentRoot /var/www/aurora/
RewriteEngine On
RewriteRule ^/(.*)$ /dav.php [L]

DocumentRoot should point to root directory of WebMail Pro 8 installation location. Standard port 80 is used. Many applications, however, treat port 8008 as a default one, configuration would look a bit different in this case:

NameVirtualHost *:8008
Listen 8008
DocumentRoot /var/www/aurora/
RewriteEngine On
RewriteRule ^/(.*)$ /dav.php [L]

Also, you need to make sure http methods required by DAV server are not blocked in web server configuration. If there are LimitExcept directives used in VirtualHost or Directory containers, those should be removed.

Configuration for nginx

For nginx webserver, add the following rule to your current location:

root aurora;
index dav.php;
if ( !-d $request_filename) {
    rewrite ^(.*) /dav.php last;

In the above configuration sample, aurora stands for WebMail Pro 8 installation location.

To make sure all the http methods required by DAV server are allowed, the following configuration is performed:


It should point to existing PHP backend or another web server where PHP backend runs.

Typical host configuration would look like:

location / {
    include fastcgi_params;
    fastcgi_read_timeout 600s;
    fastcgi_pass  unix:/opt/afterlogic/tmp/php5-fpm.sock;
    fastcgi_param  SCRIPT_FILENAME  $document_root/dav.php;
    fastcgi_split_path_info ^(.+\.php)(/[^?]*).*$;
    fastcgi_param  SCRIPT_NAME      $fastcgi_script_name;
    fastcgi_param  PATH_INFO        $fastcgi_path_info;

However, if you choose to use a separate domain or subdomain for DAV access, configuration will be different:

location = / {
    try_files @dav @dav;
location / {
    try_files $uri $uri/ @dav;
location ~* \.php$ {
    return 404;
location @dav {
    include fastcgi_params;
    fastcgi_read_timeout   180s;
    fastcgi_pass    unix:/opt/afterlogic/tmp/php5-fpm.sock;
    fastcgi_index   dav.php;
    fastcgi_param   SCRIPT_FILENAME $document_root/dav.php;

Using DAV on cPanel

In case when WebMail Pro 8 was installed via cPanel installer using direct embedding approach, using DAV is not an option as it conflicts with webmail authentication layer of cPanel.

If you'd like to use Mobile Sync, consider using alternative installation method which essentially means setting up regular product package.

To allow for using DAV, create .htaccess file in WebMail directory and place the following content there:

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

If this still doesn't work for you, you might need to recheck ModSecurity configuration which could be blocking some of HTTP methods required by DAV.

Username VS email as login

If your WebMail Pro 8 installation and your mail server are configured to accept usernames as login, rather than full email address, you'll need to adjust DAV server accordingly as well. Check data/settings/modules/Dav.config.json configuration file:

    "UseFullEmailForLogin": [
    "DomainForLoginWithoutEmail": [

Set UseFullEmailForLogin to false and supply your email domain as DomainForLoginWithoutEmail parameter.


In general case, DAV access should work right away. However, in some cases, you might need to reconfigure your web server additionally.

If it looks like the connection to DAV server is established, but your account credentials are not accepted, you can try logging into DAV server via your web browser. That feature is disabled by default, you can enable it by setting UseBrowserPlugin to true in data/settings/modules/Dav.config.json file.

Upon changing the setting, enter your DAV URL in address bar of web browser and enter credentials for any WebMail Pro 8 account. If they're rejected and prompt appears again, that means there's a configuration issue with your web server.

In case if you use IIS, or your system is configured to use PHP through CGI or FastCGI, you'll probably need to perform additional configuration. Check Webservers page of DAV server documentation for details on this.

You may also need to recheck ModSecurity configuration which could be blocking some of HTTP methods required by DAV.