Skip to content
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

Redirect away from galaxyproject.eu #477

Merged
merged 2 commits into from
Nov 2, 2022
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
68 changes: 64 additions & 4 deletions templates/nginx/galaxyproject.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,70 @@ server {

server_name galaxyproject.eu;

# Redirect homepages.
location = / {
return 301 https://galaxyproject.org/eu/;
}
location = /freiburg/ {
return 301 https://galaxyproject.org/freiburg/;
}
location = /erasmusmc/ {
return 301 https://galaxyproject.org/erasmusmc/;
}
location = /belgium/ {
return 301 https://galaxyproject.org/belgium/;
}
location = /pasteur/ {
return 301 https://galaxyproject.org/pasteur/;
}
location = /genouest/ {
return 301 https://galaxyproject.org/genouest/;
}
location = /elixir-it/ {
return 301 https://galaxyproject.org/elixir-it/;
}
location = /ifb/ {
return 301 https://galaxyproject.org/ifb/;
}

# EU-wide news/events feeds.
location ~ ^/news(\.html)?$ {
return 301 https://galaxyproject.org/eu/news/;
}
location ~ ^/events(\.html)?$ {
return 301 https://galaxyproject.org/eu/events/;
}

# Redirect other pages used by Galaxy servers to .org
location = /widgets/news.html {
return 301 https://galaxyproject.org/bare/eu/latest/news/;
}
location = /widgets/events.html {
return 301 https://galaxyproject.org/bare/eu/latest/events/;
}
location = /galaxy/news.html {
return 301 https://galaxyproject.org/bare/eu/news/;
}
location = /galaxy/events.html {
return 301 https://galaxyproject.org/bare/eu/events/;
}

# Galaxy server middle pane homepages.
location = /galaxy/ {
return 301 https://galaxyproject.org/bare/eu/usegalaxy/main/;
}
location = /index-metabolomics.html {
return 301 https://galaxyproject.org/bare/eu/usegalaxy/metabolomics/;
}
location = /index-proteomics.html {
return 301 https://galaxyproject.org/bare/eu/usegalaxy/proteomics/;
}

location / {
proxy_pass https://usegalaxy-eu.github.io/;
proxy_cache STATIC;
proxy_cache_valid 200 5m;
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
# Subsite-specific news and events pages.
rewrite ^/([^/]+)/(news|events)(\.html)?$ https://galaxyproject.org/$1/$2/ permanent;

# The rest should continue to be served by the European website, but under the github.io domain.
return 301 https://usegalaxy-eu.github.io$request_uri;
}
}