Created
October 8, 2014 22:12
-
-
Save emiaj/10c1e7a7a79c91c1051c to your computer and use it in GitHub Desktop.
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 { | |
access_log /var/logs/nginx/a/access.log; | |
error_log /var/logs/nginx/a/error.log; | |
listen 443 ssl; | |
server_name ServiceA.local.io; | |
location / { | |
proxy_pass http://10.0.0.2$request_uri; | |
} | |
} | |
server { | |
access_log /var/logs/nginx/b/access.log; | |
error_log /var/logs/nginx/b/error.log; | |
listen 443 ssl; | |
server_name ServiceB.local.io; | |
location / { | |
proxy_pass http://10.0.0.3$request_uri; | |
} | |
} |
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
{{range $service := "/nginx/services/*/"}} | |
server { | |
access_log /var/logs/nginx/{{$service.shortname}}/access.log; | |
error_log /var/logs/nginx/{{$service.shortname}}/error.log; | |
listen 443 ssl; | |
server_name {{$service.name}}.local.io; | |
location / { | |
proxy_pass http://{{$service.address}}.local.io$request_uri; | |
} | |
} | |
{{end}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment