Skip to content

Instantly share code, notes, and snippets.

@finagin
Created March 5, 2018 11:59
Show Gist options
  • Select an option

  • Save finagin/58cfe47416838cc3b22a0f1085cf98a8 to your computer and use it in GitHub Desktop.

Select an option

Save finagin/58cfe47416838cc3b22a0f1085cf98a8 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name ~^(.+)\.dev$;
set $path $1;
if ($host ~ "([^\.]+)\.[^\.]+$") {
set $path $1;
}
root /var/www/$path;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment