resty: simplified the nginx path handling logic.