New templates for nginx configurations

This commit is contained in:
Ben 2020-05-07 03:53:23 +01:00
parent 51343e3066
commit 8b5c005a39
5 changed files with 125 additions and 82 deletions

View File

@ -1,14 +0,0 @@
server {
listen 80 default_server;
server_name _;
location /play {
root /usr/share/nginx/legacy/;
index index.html index.htm;
}
location /media {
root /usr/share/nginx/legacy/;
index index.html index.htm;
}
}

View File

@ -1,34 +0,0 @@
server {
server_name play.*;
location / {
root /usr/share/nginx/legacy/play;
index index.html index.htm;
}
location /create_account/create_account.php {
proxy_pass http://dash:3000/create;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /create/activate {
proxy_pass http://localhost:3000/create/activate;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
server_name media.*;
location / {
root /usr/share/nginx/legacy/media;
index index.html index.htm;
}
}

View File

@ -1,34 +0,0 @@
server {
server_name new.*;
location / {
root /usr/share/nginx/vanilla/play;
index index.html index.htm;
}
location ~ ^/avatar/(.*)/cp$ {
proxy_pass http://dash:3000/avatar/$1$is_args$args;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
server_name vanilla.*;
location / {
root /usr/share/nginx/vanilla/media;
index index.html index.htm;
}
location /social/autocomplete/v2/search/suggestions {
proxy_pass http://localhost:3000/autocomplete;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

View File

@ -0,0 +1,52 @@
server {
server_name {{ (parseUrl .Env.WEB_LEGACY_PLAY).Host }};
{{ if (parseUrl .Env.WEB_LEGACY_PLAY).Path }}
location {{ (parseUrl .Env.WEB_LEGACY_PLAY).Path }} {
root /usr/share/nginx/legacy/;
index index.html index.htm;
}
location / {
root /usr/share/nginx/legacy/{{ (parseUrl .Env.WEB_LEGACY_PLAY).Path }};
index index.html index.htm;
}
location {{ (parseUrl .Env.WEB_LEGACY_MEDIA).Path }} {
root /usr/share/nginx/legacy/;
index index.html index.htm;
}
location {{ (parseUrl .Env.WEB_LEGACY_PLAY).Path }}/v2 {
root /usr/share/nginx/legacy/media/;
}
{{ else }}
location / {
root /usr/share/nginx/legacy/play;
index index.html index.htm;
}
{{ end }}
location /create_account/create_account.php {
proxy_pass http://dash:3000/create/legacy;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /create/activate {
proxy_pass http://dash:3000/create/activate;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
server_name {{ (parseUrl .Env.WEB_LEGACY_MEDIA).Host }};
location / {
root /usr/share/nginx/legacy/media;
index index.html index.htm;
}
}

View File

@ -0,0 +1,73 @@
server {
server_name {{ (parseUrl .Env.WEB_VANILLA_PLAY).Host }};
location {{ (parseUrl .Env.WEB_VANILLA_PLAY).Path }}/ {
root /usr/share/nginx/vanilla/play/;
index index.html index.htm;
}
location /penguin/create {
proxy_pass http://dash:3000/create/vanilla/en;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~ ^/(.*)/penguin/create {
proxy_pass http://dash:3000/create/vanilla/$1;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~ ^/(.*)/penguin/activate {
proxy_pass http://dash:3000/activate/vanilla/$1;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~ ^/avatar/(.*)/cp$ {
proxy_pass http://dash:3000/avatar/$1$is_args$args;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ^/(.*)/web-service/snfgenerator/session$ {
proxy_pass http://dash:3000/session;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/v0.2/xxx/game/get/world-name-service/start_world_request {
proxy_pass http://dash:3000/swrequest;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
server_name {{ (parseUrl .Env.WEB_VANILLA_MEDIA).Host }};
location / {
root /usr/share/nginx/vanilla/media;
index index.html index.htm;
}
location /social/autocomplete/v2/search/suggestions {
proxy_pass http://dash:3000/autocomplete;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}