Fixed fatal error on non apache

Retrieval of apache headers caused fatal error on nginx
Headers not retrieved on non apache, so REST interfaces will still only work with apache