Migrate changes from upstream 5.3
nginx location fixes