Created
July 16, 2016 16:45
-
-
Save leandrotoledo/3ae52032f5764e4d0983f2bd60be2f71 to your computer and use it in GitHub Desktop.
nginx with public_html
This file contains 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
server { | |
listen 80; | |
server_name _; | |
server_name_in_redirect off; | |
location ~ ^/~(.+?)(/.*)?$ { | |
alias /home/$1/public_html$2; | |
autoindex on; | |
} | |
location / { | |
root /var/www; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment