http {
  include       mime.types;
  default_type  application/octet-stream;

  perl_modules lib;
  perl_require Sitemap.pm;

  keepalive_timeout  65;

  server {
    listen       8090;
    server_name  sitemaps.worldsoft-cms.info;

    location / {
      root   html;
      index  index.html index.htm;
      if (!-f $request_filename) {
        rewrite ^/(.*)-sitemap.xml$ /sitemap/$1 last;
        # If a file matches somethingsomething-sitemap.xml
        # then redirect it to /sitemap/somethingsomething
        # here somethingsomething will match a domain
      }
    }

    location /sitemap {
      perl Sitemap::handler;
    }
  }
}
