sub domain to sub folder

Nginx map subdomain to subfolder

In this tutorial I’ll show you how to direct your incoming web traffic dynamically to folders on your server. This is really useful for a lot of setups I use this one a lot for development environments because you can give developers rights to create new folders and it automatically has its own sub domain. Example: DNS endpoint Folder on disk example.com /var/www/example.com/htdocs/ test.