Skip to content

Instantly share code, notes, and snippets.

@xeoncross
Created September 2, 2011 02:20
Show Gist options
  • Save xeoncross/1187793 to your computer and use it in GitHub Desktop.
Save xeoncross/1187793 to your computer and use it in GitHub Desktop.
Route all subdomains to their own folders
server {
listen 80;
server_name ~^(.+)\.frameworks\.loc$;
set $file_path $1;
root /home/_______/www/frameworks/$file_path/public;
index index.html index.php;
include /etc/nginx/defaults.conf;
}
# make sure to create matching entries in /etc/hosts!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment