Serve a 404 on bad requests and add context path configuration.