proper nginx configuration for API