2015-01-13 20:19:42 +00:00
|
|
|
# vim: ft=nginx
|
|
|
|
|
2014-01-31 23:13:46 +00:00
|
|
|
server_name _;
|
|
|
|
|
|
|
|
keepalive_timeout 5;
|
|
|
|
|
|
|
|
if ($args ~ "_escaped_fragment_") {
|
|
|
|
rewrite ^ /snapshot$uri;
|
|
|
|
}
|
|
|
|
|
2015-05-22 20:25:28 +00:00
|
|
|
# Disable the ability to be embedded into iframes
|
2015-05-22 17:54:43 +00:00
|
|
|
add_header X-Frame-Options DENY;
|
|
|
|
|
|
|
|
|
|
|
|
# Proxy Headers
|
2015-02-19 21:24:05 +00:00
|
|
|
proxy_set_header X-Forwarded-For $proper_forwarded_for;
|
2015-01-21 20:59:29 +00:00
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_set_header Host $http_host;
|
|
|
|
proxy_redirect off;
|
2014-10-14 17:58:08 +00:00
|
|
|
|
2015-01-21 20:59:29 +00:00
|
|
|
proxy_set_header Transfer-Encoding $http_transfer_encoding;
|
2014-10-14 17:58:08 +00:00
|
|
|
|
2014-01-31 23:13:46 +00:00
|
|
|
location / {
|
2014-10-14 17:58:08 +00:00
|
|
|
proxy_pass http://web_app_server;
|
|
|
|
}
|
|
|
|
|
2014-10-17 19:50:40 +00:00
|
|
|
location /realtime {
|
|
|
|
proxy_pass http://web_app_server;
|
|
|
|
proxy_buffering off;
|
2014-11-24 21:07:38 +00:00
|
|
|
proxy_request_buffering off;
|
2014-10-17 19:50:40 +00:00
|
|
|
}
|
|
|
|
|
2015-02-25 17:32:48 +00:00
|
|
|
# At the begining and end of a push/pull, /v1/repositories is hit by the Docker
|
|
|
|
# client. By rate-limiting just this endpoint, we can avoid accidentally
|
|
|
|
# blocking pulls/pushes for images with many layers.
|
2015-02-19 21:24:05 +00:00
|
|
|
location /v1/repositories/ {
|
|
|
|
proxy_buffering off;
|
|
|
|
|
|
|
|
proxy_request_buffering off;
|
|
|
|
|
|
|
|
proxy_pass http://registry_app_server;
|
|
|
|
proxy_read_timeout 2000;
|
2015-03-26 13:21:45 +00:00
|
|
|
proxy_temp_path /tmp 1 2;
|
2015-02-19 21:24:05 +00:00
|
|
|
|
2015-02-25 17:22:41 +00:00
|
|
|
limit_req zone=repositories burst=10;
|
2015-02-19 21:24:05 +00:00
|
|
|
}
|
|
|
|
|
2014-10-14 17:58:08 +00:00
|
|
|
location /v1/ {
|
|
|
|
proxy_buffering off;
|
|
|
|
|
|
|
|
proxy_request_buffering off;
|
|
|
|
|
2015-06-04 18:31:08 +00:00
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Connection "";
|
|
|
|
|
2014-10-14 17:58:08 +00:00
|
|
|
proxy_pass http://registry_app_server;
|
2015-03-26 13:21:45 +00:00
|
|
|
proxy_temp_path /tmp 1 2;
|
2014-10-14 17:58:08 +00:00
|
|
|
|
|
|
|
client_max_body_size 20G;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /c1/ {
|
2014-01-31 23:13:46 +00:00
|
|
|
proxy_buffering off;
|
|
|
|
|
|
|
|
proxy_request_buffering off;
|
|
|
|
|
2014-10-14 17:58:08 +00:00
|
|
|
proxy_pass http://verbs_app_server;
|
2015-03-26 13:21:45 +00:00
|
|
|
proxy_temp_path /tmp 1 2;
|
2015-02-19 21:24:05 +00:00
|
|
|
|
2015-02-25 17:32:30 +00:00
|
|
|
limit_req zone=verbs burst=10;
|
2014-10-02 20:04:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
location /static/ {
|
|
|
|
# checks for static file, if not found proxy to app
|
|
|
|
alias /static/;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /v1/_ping {
|
|
|
|
add_header Content-Type text/plain;
|
2014-10-03 20:41:16 +00:00
|
|
|
add_header X-Docker-Registry-Version 0.6.0;
|
|
|
|
add_header X-Docker-Registry-Standalone 0;
|
2014-11-07 15:05:05 +00:00
|
|
|
return 200 'true';
|
2014-11-24 21:07:38 +00:00
|
|
|
}
|
2014-11-25 23:08:18 +00:00
|
|
|
|
|
|
|
location ~ ^/b1/controller(/?)(.*) {
|
|
|
|
proxy_pass http://build_manager_controller_server/$2;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~ ^/b1/socket(/?)(.*) {
|
|
|
|
proxy_pass http://build_manager_websocket_server/$2;
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
2014-12-01 17:48:59 +00:00
|
|
|
}
|