Created
May 10, 2015 11:39
-
-
Save jbking/de1c8faca037afa30adf to your computer and use it in GitHub Desktop.
proxy to same location but via different path with logging each other.
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
error_log logs/error.log error; | |
http { | |
access_log logs/access.log combined; | |
server { | |
listen 8081; | |
root /tmp/; | |
} | |
server { | |
listen 8080; | |
location /1/ { | |
proxy_pass http://localhost:8081; | |
access_log logs/access_via_1.log combined; | |
rewrite /1(/.+) $1 break; | |
} | |
location /2/ { | |
proxy_pass http://localhost:8081; | |
access_log logs/access_via_2.log combined; | |
rewrite /2(/.+) $1 break; | |
} | |
} | |
} | |
events { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment