utility function for nginx