Last active
August 29, 2015 14:13
-
-
Save npeters/977a3699b657c67eccb2 to your computer and use it in GitHub Desktop.
nginx router
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
# map http://nginx.org/en/docs/http/ngx_http_map_module.html#map | |
# dns https://www.jethrocarr.com/2013/11/02/nginx-reverse-proxies-and-dns-resolution/ | |
# http://www.senginx.org/en/index.php/Dynamic_DNS_Resolve | |
events { | |
worker_connections 4096; ## Default: 1024 | |
} | |
http { | |
index index.html index.htm index.php; | |
map $http_x_domain $serveroute { | |
default "toto"; | |
N4 "http://www.google.fr"; | |
N5 "http://www.google.com"; | |
} | |
server { | |
listen 11182; | |
server_name localhost; | |
resolver 8.8.8.8; | |
location / { | |
proxy_pass $serveroute; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment