Skip to content

Instantly share code, notes, and snippets.

@JesseHerrick
Created October 11, 2014 14:24
Show Gist options
  • Save JesseHerrick/4060009d384f20465307 to your computer and use it in GitHub Desktop.
Save JesseHerrick/4060009d384f20465307 to your computer and use it in GitHub Desktop.
Nginx user hosting.
location ~ ^/(.+?)(/.*)?$ {
alias /home/$1/www$2;
index index.html;
autoindex on;
}
@JesseHerrick
Copy link
Author

Each user should now have a directory called www/ that is hosting at http://hostname/username/path/to/file/in/www.

@JesseHerrick
Copy link
Author

The www/ directory should have chmod 755 permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment