Last active
June 26, 2017 17:44
-
-
Save HomerJSimpson/8f2f7fa1210b902f2c87f4c2310afa5f to your computer and use it in GitHub Desktop.
reverse proxy for testing
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 { | |
listen 80; | |
server_name localhost; | |
location /api/facet-suggest { | |
proxy_pass http://facet-suggest:3000/api/facet-suggest; | |
} | |
location /api/location { | |
proxy_pass http://location-search:3000/api/location; | |
} | |
location /api/solr { | |
proxy_pass http://10.43.2.134:8983/solr; | |
} | |
location /uxs { | |
proxy_pass http://uxs:3000/; | |
} | |
location / { | |
proxy_pass http://candidate-re-search:3000; | |
} | |
error_page 404 /404.html; | |
# redirect server error pages to the static page /50x.html | |
# | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root /usr/share/nginx/html; | |
} | |
} | |
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
proxy_set_header Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; |
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
#!/usr/bin/env bash | |
docker run \ | |
--name=nginx \ | |
--rm \ | |
-v $PWD/default.conf:/etc/nginx/conf.d/default.conf \ | |
-v $PWD/proxy_params:/etc/nginx/proxy_params \ | |
--link facet-suggest \ | |
--link location-search \ | |
--link uxs \ | |
--link candidate-re-search \ | |
-p 80:80 \ | |
nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment