NGINX configuration file

We got contributions for a nginx config that could become a z-push-config package, but the configuration seems not fully sane.

Could you guys have a look at this config file and do a contribution that fits the following points:

the config should be working when installed. Is it possible to listen on port 80 and comment the ssl settings (certificates)? This way when installing it “would work” and not fail with an error message (like certs not found). The SSL settings should be there, but inactive.

once the fpm socket is /var/run/php5-fpm.sock the next time /run/php-fpm/php-fpm.sock. Which one is correct? How does this variate on different distributions? We could build different paths for different distros. We just need to know the correct locations for all supported distros.

is a location / block really what we want here? Shouldn’t the ActiveSync & AutoDiscover locations be enough?

how does the inclusion of fastcgi_params work? Once it has a full path then it doesn’t.

can the autodiscover location be made case-insensitive? Because different mobiles use all kinds of different casings for this URL.

is there a way of using variables? In line 9 rootis defined, but then fully declared again e.g. in line 33. Could this be made more generic (e.g. reusing root there)?

we use Z-Push and WebApp on Debian 8 with Nginx for about 2 years now. It is a dedicated mailserver VM. There are about 20-25 clients connected. ~20 Outlooks, about six Androids and two iPhones.
Beacause of the lack of public information about Zarafa/Kopano/Z-Push in combination with Nginx, I solved this this way: