2018-06-05 00:34:40 +02:00
|
|
|
# HTTP - redirect all requests to HTTPS:
|
|
|
|
server {
|
|
|
|
listen 80;
|
2018-06-20 00:22:18 +02:00
|
|
|
#server_name alpha.editor.p5js.org;
|
2018-06-05 00:34:40 +02:00
|
|
|
location / {
|
2018-06-20 00:22:18 +02:00
|
|
|
proxy_pass http://app:8000;
|
2018-06-05 00:34:40 +02:00
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection 'upgrade';
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_cache_bypass $http_upgrade;
|
|
|
|
}
|
2018-06-20 00:22:18 +02:00
|
|
|
# location ~* \/login(\/)* {
|
|
|
|
# return 301 https://$host$request_uri;
|
|
|
|
# }
|
|
|
|
# location ~* \/signup(\/)* {
|
|
|
|
# return 301 https://$host$request_uri;
|
|
|
|
# }
|
|
|
|
# location ~* \/reset-password(\/)* {
|
|
|
|
# return 301 https://$host$request_uri;
|
|
|
|
# }
|
|
|
|
# location ~* "\/[a-zA-Z0-9._-]{1,20}\/account(\/)*" {
|
|
|
|
# return 301 https://$host$request_uri;
|
|
|
|
# }
|
2018-06-05 00:34:40 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2018-06-07 22:09:51 +02:00
|
|
|
# server {
|
|
|
|
# listen 443;
|
|
|
|
# ssl on;
|
|
|
|
# ssl_certificate /etc/letsencrypt/live/alpha.editor.p5js.org/fullchain.pem;
|
|
|
|
# ssl_certificate_key /etc/letsencrypt/live/alpha.editor.p5js.org/privkey.pem;
|
|
|
|
# server_name alpha.editor.p5js.org;
|
|
|
|
# location / {
|
|
|
|
# proxy_pass http://127.0.0.1:8000;
|
|
|
|
# proxy_http_version 1.1;
|
|
|
|
# proxy_set_header Upgrade $http_upgrade;
|
|
|
|
# proxy_set_header Connection 'upgrade';
|
|
|
|
# proxy_set_header Host $host;
|
|
|
|
# proxy_cache_bypass $http_upgrade;
|
|
|
|
# }
|
|
|
|
# }
|
2018-06-05 00:34:40 +02:00
|
|
|
|
2018-06-20 00:22:18 +02:00
|
|
|
# server {
|
|
|
|
# listen 80;
|
|
|
|
# server_name editor.p5js.org;
|
|
|
|
# location ~ ^/(.*) {
|
|
|
|
# return 302 http://alpha.editor.p5js.org/$1;
|
|
|
|
# }
|
|
|
|
# }
|
2018-06-05 00:34:40 +02:00
|
|
|
|
2018-06-07 22:09:51 +02:00
|
|
|
# server {
|
|
|
|
# listen 443;
|
|
|
|
# ssl on;
|
|
|
|
# ssl_certificate /etc/letsencrypt/live/editor.p5js.org/fullchain.pem;
|
|
|
|
# ssl_certificate_key /etc/letsencrypt/live/editor.p5js.org/privkey.pem;
|
|
|
|
# server_name editor.p5js.org;
|
|
|
|
# location ~ ^/(.*) {
|
|
|
|
# return 302 https://alpha.editor.p5js.org/$1;
|
|
|
|
# }
|
|
|
|
# }
|