8000 Update buildbot nginx config to do away with `^/all/` by zware · Pull Request #372 · python/psf-salt · GitHub
[go: up one dir, main page]

Skip to content

Update buildbot nginx config to do away with ^/all/ #372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 10 additions & 21 deletions salt/buildbot/config/nginx.conf.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -21,39 +21,28 @@ server {
error_log /var/log/nginx/buildbot-master.error.log;
access_log /var/log/nginx/buildbot-master.access.log main;

rewrite ^/$ https://www.python.org/dev/buildbot/ redirect;
rewrite ^/3.7(/?)$ /all/#/grid?branch=3.7 redirect;
rewrite ^/3.8(/?)$ /all/#/grid?branch=3.8 redirect;
rewrite ^/3.9(/?)$ /all/#/grid?branch=3.9 redirect;
rewrite ^/3.10(/?)$ /all/#/grid?branch=3.10 redirect;
rewrite ^/3.x(/?)$ /all/#/grid?branch=main redirect;
rewrite ^/3.7.stable(/?)$ /all/#/grid?branch=3.7&tag=stable redirect;
rewrite ^/3.8.stable(/?)$ /all/#/grid?branch=3.8&tag=stable redirect;
rewrite ^/3.9.stable(/?)$ /all/#/grid?branch=3.9&tag=stable redirect;
rewrite ^/3.10.stable(/?)$ /all/#/grid?branch=3.10&tag=stable redirect;
rewrite ^/3.x.stable(/?)$ /all/#/grid?branch=main&tag=stable redirect;
rewrite ^/stable(/?)$ /all/#/grid?tag=stable redirect;
rewrite ^/3.(\d+)(/?)$ /#/grid?branch=3.$1 redirect;
rewrite ^/3.x(/?)$ /#/grid?branch=main redirect;
rewrite ^/3.(\d+).stable(/?)$ /#/grid?branch=3.$1&tag=stable redirect;
rewrite ^/3.x.stable(/?)$ /#/grid?branch=main&tag=stable redirect;
rewrite ^/stable(/?)$ /#/grid?tag=stable redirect;

location @backend {
rewrite ^/all/(.*)$ /$1 redirect;

location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
rewrite /all/(.*) /$1 break;
proxy_pass http://localhost:9010;
}

location / {
autoindex on;
root /data/www/buildbot/;
}

location /all/ {
location /robots.txt {
autoindex on;
root /data/www/buildbot/;
try_files $uri $uri/ @backend;
}

location /all/ws {
location /ws {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
Expand Down
Loading
0