Skip to content

Commit

Permalink
Add 5.next to frontend nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed May 21, 2024
1 parent 3fc5b41 commit 6e31a8f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions nginx.conf.sigil
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ server {
rewrite ^/5(?:\.0)?/([^/]+) /5/$1/index.html redirect;
}

# Handle /5.next
location ~ ^/5\.next/?$ {
rewrite ^/5\.next/([^/]+) /5.next/$1/index.html redirect;
}
# Handle /5.next/en
location ~ ^/5\.next/([a-z][a-z])/?$ {
rewrite ^/5\.next/([^/]+) /5.next/$1/index.html redirect;
}

# Handle /4.next
location ~ ^/4\.next/?$ {
rewrite ^/4\.next/([^/]+) /4.next/$1/index.html redirect;
Expand Down Expand Up @@ -383,6 +392,11 @@ server {
}

# Proxy pass to version specific containers.
location ~ ^/5\.next/(.*) {
proxy_set_header Host "book-5next.cakephp.org";
proxy_pass http://localhost:80/$1;
}

location ~ ^/5/(.*) {
proxy_set_header Host "book-5.cakephp.org";
proxy_pass http://localhost:80/$1;
Expand Down

0 comments on commit 6e31a8f

Please sign in to comment.