Skip to content

Instantly share code, notes, and snippets.

@gnurag
Created April 18, 2012 12:35
Show Gist options
  • Save gnurag/2413321 to your computer and use it in GitHub Desktop.
Save gnurag/2413321 to your computer and use it in GitHub Desktop.
Setting up UserDir on Nginx
# userdir simulation
location ~ /~([^/]+)($|/.*)$ {
alias /home/$1/public_html$2;
error_page 404 = @404;
autoindex on;
}
location @404 {
return 404;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment