'Nginx static url specific to subdomain

I have a url

site.com/awesome-slug

and I need to serve this url to a subdomain

awesome-slug.site.com

Just to clarify: I need to access the same content from both urls. I think it's possible but I don't know what rule should add to nginx conf.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source