Created
November 10, 2016 07:47
-
-
Save jaamo/7e0ca58c19fe390a8ff354f874a5b603 to your computer and use it in GitHub Desktop.
Nginx: document root based on client's ip address
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
# Set the default path | |
set $root /var/www/html/dist; | |
# Change the document root path based on user's ip address | |
if ($remote_addr ~ "^(71\.134\.111\.38)$") { | |
set $root /var/www/html/dist1; | |
} | |
# Set config | |
root $root; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment