Sitemap on WordPress Yoast SEO with nginx web server giving 404 error


I installed yoast seo on a wordpress website that is on the nginx web server, but when i clicked the xml sitemap link it shows 404 not found error. Any suggestions to solve this?