Created
July 22, 2019 20:29
-
-
Save j1cs/d819ecc552566ca9cb4f2ff08289c952 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
log_format sniffing '$remote_addr - $remote_user [$time_local] ' | |
'"$request" $status $body_bytes_sent ' | |
'"$http_referer" "$http_user_agent" "$http_x_forwarded_for" "$request_body" "$http_Authorization" "$http_x_duid" "$http_x_ver" "$upstream_http_x_rqid"'; | |
upstream backend { | |
server server.local:7003; | |
server server.local:7003; | |
} | |
server { | |
listen 80; | |
server_name server2.local; | |
root /usr/share/nginx/html; | |
index index.html; | |
location ~/ms-backend/(.*) { | |
proxy_pass backend/$1$is_args$args; | |
proxy_redirect off; | |
proxy_set_header Host gateway; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Host $server_name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment