Skip to content

Commit

Permalink
added interactive.nodejs.org redirect and cleaned up others
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Sep 10, 2015
1 parent 13a61dd commit 6c52e9f
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions setup/www/resources/config/nodejs.org
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ server {
}

server {
listen 80;
listen [::]:80;
listen blog.nodejs.org:80;
server_name blog.nodejs.org;

rewrite ^/\d+/\d+/\d+/(?:node-v(?:ersion-)?|version-)(\d+)[-\.](\d+)[-\.](\d+).*$ https://nodejs.org/en/blog/release/v$1.$2.$3/ permanent;
Expand Down Expand Up @@ -120,34 +119,38 @@ server {
}

server {
listen 80;
listen [::]:80;
listen docs.nodejs.org:80;
server_name doc.nodejs.org docs.nodejs.org;

rewrite ^/(.*)$ https://nodejs.org/en/docs/ permanent;
}

server {
listen 80;
listen [::]:80;
listen api.nodejs.org:80;
server_name api.nodejs.org;

rewrite ^/(.*)$ https://nodejs.org/api/ permanent;
}

server {
listen 80;
listen [::]:80;
listen dist.nodejs.org:80;
server_name dist.nodejs.org;

rewrite ^/(.*)$ https://nodejs.org/dist/ permanent;
}

server {
listen interactive.nodejs.org:80;
server_name interactive.nodejs.org;

rewrite ^(.*)$ http://events.linuxfoundation.org/events/node-interactive permanent;
}

server {
listen 443 default_server ssl spdy;
listen [::]:443 default_server ipv6only=on ssl spdy;

server_name nodejs.org www.nodejs.org blog.nodejs.org;
server_name nodejs.org www.nodejs.org blog.nodejs.org new.nodejs.org;

ssl_certificate ssl/nodejs_chained.crt;
ssl_certificate_key ssl/nodejs.key;
Expand Down Expand Up @@ -191,6 +194,10 @@ server {
rewrite ^(.*)$ https://nodejs.org$1;
}

if ($host ~* ^new\.) {
rewrite ^(.*)$ https://nodejs.org$1;
}

if ($host ~* ^blog\.) {
# keep the blog rewrites in the blog.nodejs.org:80 config
# and shunt blog.nodejs.org:443 requests through there
Expand Down

0 comments on commit 6c52e9f

Please sign in to comment.