** Fixed ** Sitemap_index.xml no longer working yoast SEO

I installed yoast SEO hoping to build and install a sitemap.xml, after installing the plugin i added the following code to my example.com file in the nginx conf file.

 #Yoast sitemap
location ~ ([^/]*)sitemap(.*)\.x(m|s)l$ {
	rewrite ^/sitemap\.xml$ /sitemap_index.xml permanent;
        rewrite ^/sitemap\.xsl$ /index.php?xsl=1 last;
	rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
	rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;

        ## following lines are options. Needed for wordpress-seo addons
        rewrite ^/news_sitemap\.xml$ /index.php?sitemap=wpseo_news last;
	rewrite ^/locations\.kml$ /index.php?sitemap=wpseo_local_kml last;
	rewrite ^/geo_sitemap\.xml$ /index.php?sitemap=wpseo_local last;
	rewrite ^/video-sitemap\.xsl$ /index.php?xsl=video last;

    	access_log off;
}

Now I’m getting this error.

Error loading stylesheet: An unknown error has occurred (805303f4)https://www.gooeypixel.com/main-sitemap.xsl

Anyone know what I maybe missing, Best Regaurds!!

After looking around the community I found this info

changed this code.

rewrite ^/sitemap\.xsl$ /index.php?xsl=1 last;

should read

rewrite ^/([a-z]+)?-?sitemap\.xsl$ /index.php?xsl=$1 last;

Worked great! Thank you @Rahul Bansal