Last active
November 18, 2016 21:59
-
-
Save aweiteka/6e37dee7f27fb21e80cb4b50bedccc4b to your computer and use it in GitHub Desktop.
Nginx proxy redirect
This file contains hidden or 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
# docker run --net=host -it --rm --name nginx -p 80:80 -v `pwd`/nginx.conf:/etc/nginx/nginx.conf:ro nginx | |
# registry endpoint auth not passing through | |
# use includes | |
# make rules more dry | |
# test scale (100s of image layers?) | |
# pass through cdn CA and cert/key | |
events { | |
worker_connections 1024; | |
} | |
http { | |
server { | |
listen 80; | |
# cdn.stage.redhat.com | |
location ~/v2/.*/blobs/(sha256:9b0dee6356a152d6cbac4adf6ce40ae4df40442d559931862ad65c78ed373979)$ { | |
proxy_pass http://10.24.122.27/content/dist/rhel/server/7/7Server/x86_64/containers/registry/rhel/blobs/$1; | |
} | |
location ~/v2/.*/blobs/(sha256:972548a33962c6f466128fc90db5d224d8bb5f589ffd9a998a43f323c7111cf5)$ { | |
proxy_pass http://10.24.122.27/content/dist/rhel/server/7/7Server/x86_64/containers/registry/rhel/blobs/$1; | |
} | |
# auth not passing through | |
location / { | |
proxy_pass http://10.3.9.210:5000; | |
} | |
#location /v2/ { | |
# proxy_pass http://10.3.9.210:5000/v2/; | |
#} | |
#location /openshift/token { | |
# proxy_pass http://10.3.9.210:5000/openshift/token; | |
#} | |
#location / { | |
# root /usr/share/nginx/html; | |
#} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment