Created
October 11, 2014 14:24
-
-
Save JesseHerrick/4060009d384f20465307 to your computer and use it in GitHub Desktop.
Nginx user hosting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ~ ^/(.+?)(/.*)?$ { | |
alias /home/$1/www$2; | |
index index.html; | |
autoindex on; | |
} |
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
Each user should now have a directory called
www/
that is hosting athttp://hostname/username/path/to/file/in/www
.