helper for using with nginx