From 7a11f1ef6487506bfce5e81c3da72bfc58b6aaa6 Mon Sep 17 00:00:00 2001 From: apostolof Date: Thu, 25 Feb 2021 21:55:42 +0200 Subject: [PATCH] fix: move redirect confs to vhost for all services --- docker-compose.yml | 12 ++++ nginx-reverse-proxy-confs/redirect.conf | 64 ------------------- .../www.concordia.ecentrics.net | 1 + .../www.contracts.concordia.ecentrics.net | 1 + nginx-reverse-proxy-confs/www.ecentrics.net | 1 + .../www.ganache.ecentrics.net | 1 + .../www.guide.concordia.ecentrics.net | 1 + .../www.pinner.concordia.ecentrics.net | 1 + .../www.rendezvous.ecentrics.net | 1 + .../www.staging.concordia.ecentrics.net | 1 + ....staging.contracts.concordia.ecentrics.net | 1 + .../www.staging.ganache.ecentrics.net | 1 + .../www.staging.guide.concordia.ecentrics.net | 1 + ...www.staging.pinner.concordia.ecentrics.net | 1 + 14 files changed, 24 insertions(+), 64 deletions(-) delete mode 100644 nginx-reverse-proxy-confs/redirect.conf create mode 100644 nginx-reverse-proxy-confs/www.concordia.ecentrics.net create mode 100644 nginx-reverse-proxy-confs/www.contracts.concordia.ecentrics.net create mode 100644 nginx-reverse-proxy-confs/www.ecentrics.net create mode 100644 nginx-reverse-proxy-confs/www.ganache.ecentrics.net create mode 100644 nginx-reverse-proxy-confs/www.guide.concordia.ecentrics.net create mode 100644 nginx-reverse-proxy-confs/www.pinner.concordia.ecentrics.net create mode 100644 nginx-reverse-proxy-confs/www.rendezvous.ecentrics.net create mode 100644 nginx-reverse-proxy-confs/www.staging.concordia.ecentrics.net create mode 100644 nginx-reverse-proxy-confs/www.staging.contracts.concordia.ecentrics.net create mode 100644 nginx-reverse-proxy-confs/www.staging.ganache.ecentrics.net create mode 100644 nginx-reverse-proxy-confs/www.staging.guide.concordia.ecentrics.net create mode 100644 nginx-reverse-proxy-confs/www.staging.pinner.concordia.ecentrics.net diff --git a/docker-compose.yml b/docker-compose.yml index cb3d8a4..3f36e25 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,7 +32,19 @@ services: - ./volumes/nginx/certs:/etc/nginx/certs:ro - ./nginx-reverse-proxy-confs/client-max-body-size.conf:/etc/nginx/conf.d/client-max-body-size.conf:ro - ./nginx-reverse-proxy-confs/redirect.conf:/etc/nginx/conf.d/redirect.conf:ro + - ./nginx-reverse-proxy-confs/www.ecentrics.net:/etc/nginx/vhost.d/www.ecentrics.net_location:ro - ./nginx-reverse-proxy-confs/www.jenkins.ecentrics.net:/etc/nginx/vhost.d/www.jenkins.ecentrics.net_location:ro + - ./nginx-reverse-proxy-confs/www.concordia.ecentrics.net:/etc/nginx/vhost.d/www.concordia.ecentrics.net_location:ro + - ./nginx-reverse-proxy-confs/www.staging.concordia.ecentrics.net:/etc/nginx/vhost.d/www.staging.concordia.ecentrics.net_location:ro + - ./nginx-reverse-proxy-confs/www.guide.concordia.ecentrics.net:/etc/nginx/vhost.d/www.guide.concordia.ecentrics.net_location:ro + - ./nginx-reverse-proxy-confs/www.staging.guide.concordia.ecentrics.net:/etc/nginx/vhost.d/www.staging.guide.concordia.ecentrics.net_location:ro + - ./nginx-reverse-proxy-confs/www.ganache.ecentrics.net:/etc/nginx/vhost.d/www.ganache.ecentrics.net_location:ro + - ./nginx-reverse-proxy-confs/www.staging.ganache.ecentrics.net:/etc/nginx/vhost.d/www.staging.ganache.ecentrics.net_location:ro + - ./nginx-reverse-proxy-confs/www.rendezvous.ecentrics.net:/etc/nginx/vhost.d/www.rendezvous.ecentrics.net_location:ro + - ./nginx-reverse-proxy-confs/www.contracts.concordia.ecentrics.net:/etc/nginx/vhost.d/www.contracts.concordia.ecentrics.net_location:ro + - ./nginx-reverse-proxy-confs/www.staging.contracts.concordia.ecentrics.net:/etc/nginx/vhost.d/www.staging.contracts.concordia.ecentrics.net_location:ro + - ./nginx-reverse-proxy-confs/www.pinner.concordia.ecentrics.net:/etc/nginx/vhost.d/www.pinner.concordia.ecentrics.net_location:ro + - ./nginx-reverse-proxy-confs/www.staging.pinner.concordia.ecentrics.net:/etc/nginx/vhost.d/www.staging.pinner.concordia.ecentrics.net_location:ro # Letsencrypt automated creation, renewal and use of Let's Encrypt certificates # Reference: diff --git a/nginx-reverse-proxy-confs/redirect.conf b/nginx-reverse-proxy-confs/redirect.conf deleted file mode 100644 index 5ea65c1..0000000 --- a/nginx-reverse-proxy-confs/redirect.conf +++ /dev/null @@ -1,64 +0,0 @@ -server { - server_name www.ecentrics.net; - return 301 $scheme://ecentrics.net$request_uri; -} - -server { - server_name www.jenkins.ecentrics.net; - return 301 $scheme://jenkins.ecentrics.net$request_uri; -} - -server { - server_name www.concordia.ecentrics.net; - return 301 $scheme://concordia.ecentrics.net$request_uri; -} - -server { - server_name www.staging.concordia.ecentrics.net; - return 301 $scheme://staging.concordia.ecentrics.net$request_uri; -} - -server { - server_name www.guide.concordia.ecentrics.net; - return 301 $scheme://guide.concordia.ecentrics.net$request_uri; -} - -server { - server_name www.staging.guide.concordia.ecentrics.net; - return 301 $scheme://staging.guide.concordia.ecentrics.net$request_uri; -} - -server { - server_name www.ganache.ecentrics.net; - return 301 $scheme://ganache.ecentrics.net$request_uri; -} - -server { - server_name www.staging.ganache.ecentrics.net; - return 301 $scheme://staging.ganache.ecentrics.net$request_uri; -} - -server { - server_name www.rendezvous.ecentrics.net; - return 301 $scheme://rendezvous.ecentrics.net$request_uri; -} - -server { - server_name www.contracts.concordia.ecentrics.net; - return 301 $scheme://contracts.concordia.ecentrics.net$request_uri; -} - -server { - server_name www.staging.contracts.concordia.ecentrics.net; - return 301 $scheme://staging.contracts.concordia.ecentrics.net$request_uri; -} - -server { - server_name www.pinner.concordia.ecentrics.net; - return 301 $scheme://pinner.concordia.ecentrics.net$request_uri; -} - -server { - server_name www.staging.pinner.concordia.ecentrics.net; - return 301 $scheme://staging.pinner.concordia.ecentrics.net$request_uri; -} \ No newline at end of file diff --git a/nginx-reverse-proxy-confs/www.concordia.ecentrics.net b/nginx-reverse-proxy-confs/www.concordia.ecentrics.net new file mode 100644 index 0000000..92845fa --- /dev/null +++ b/nginx-reverse-proxy-confs/www.concordia.ecentrics.net @@ -0,0 +1 @@ +rewrite ^/(.*)$ http://concordia.ecentrics.net/$1 permanent; diff --git a/nginx-reverse-proxy-confs/www.contracts.concordia.ecentrics.net b/nginx-reverse-proxy-confs/www.contracts.concordia.ecentrics.net new file mode 100644 index 0000000..9597d72 --- /dev/null +++ b/nginx-reverse-proxy-confs/www.contracts.concordia.ecentrics.net @@ -0,0 +1 @@ +rewrite ^/(.*)$ http://contracts.concordia.ecentrics.net/$1 permanent; diff --git a/nginx-reverse-proxy-confs/www.ecentrics.net b/nginx-reverse-proxy-confs/www.ecentrics.net new file mode 100644 index 0000000..54df959 --- /dev/null +++ b/nginx-reverse-proxy-confs/www.ecentrics.net @@ -0,0 +1 @@ +rewrite ^/(.*)$ http://ecentrics.net/$1 permanent; diff --git a/nginx-reverse-proxy-confs/www.ganache.ecentrics.net b/nginx-reverse-proxy-confs/www.ganache.ecentrics.net new file mode 100644 index 0000000..15091c8 --- /dev/null +++ b/nginx-reverse-proxy-confs/www.ganache.ecentrics.net @@ -0,0 +1 @@ +rewrite ^/(.*)$ http://ganache.ecentrics.net/$1 permanent; diff --git a/nginx-reverse-proxy-confs/www.guide.concordia.ecentrics.net b/nginx-reverse-proxy-confs/www.guide.concordia.ecentrics.net new file mode 100644 index 0000000..ca60db2 --- /dev/null +++ b/nginx-reverse-proxy-confs/www.guide.concordia.ecentrics.net @@ -0,0 +1 @@ +rewrite ^/(.*)$ http://guide.concordia.ecentrics.net/$1 permanent; diff --git a/nginx-reverse-proxy-confs/www.pinner.concordia.ecentrics.net b/nginx-reverse-proxy-confs/www.pinner.concordia.ecentrics.net new file mode 100644 index 0000000..c105143 --- /dev/null +++ b/nginx-reverse-proxy-confs/www.pinner.concordia.ecentrics.net @@ -0,0 +1 @@ +rewrite ^/(.*)$ http://pinner.concordia.ecentrics.net/$1 permanent; diff --git a/nginx-reverse-proxy-confs/www.rendezvous.ecentrics.net b/nginx-reverse-proxy-confs/www.rendezvous.ecentrics.net new file mode 100644 index 0000000..5e8f1cd --- /dev/null +++ b/nginx-reverse-proxy-confs/www.rendezvous.ecentrics.net @@ -0,0 +1 @@ +rewrite ^/(.*)$ http://rendezvous.ecentrics.net/$1 permanent; diff --git a/nginx-reverse-proxy-confs/www.staging.concordia.ecentrics.net b/nginx-reverse-proxy-confs/www.staging.concordia.ecentrics.net new file mode 100644 index 0000000..272a0b7 --- /dev/null +++ b/nginx-reverse-proxy-confs/www.staging.concordia.ecentrics.net @@ -0,0 +1 @@ +rewrite ^/(.*)$ http://staging.concordia.ecentrics.net/$1 permanent; diff --git a/nginx-reverse-proxy-confs/www.staging.contracts.concordia.ecentrics.net b/nginx-reverse-proxy-confs/www.staging.contracts.concordia.ecentrics.net new file mode 100644 index 0000000..5a70829 --- /dev/null +++ b/nginx-reverse-proxy-confs/www.staging.contracts.concordia.ecentrics.net @@ -0,0 +1 @@ +rewrite ^/(.*)$ http://staging.contracts.concordia.ecentrics.net/$1 permanent; diff --git a/nginx-reverse-proxy-confs/www.staging.ganache.ecentrics.net b/nginx-reverse-proxy-confs/www.staging.ganache.ecentrics.net new file mode 100644 index 0000000..147c38a --- /dev/null +++ b/nginx-reverse-proxy-confs/www.staging.ganache.ecentrics.net @@ -0,0 +1 @@ +rewrite ^/(.*)$ http://staging.ganache.ecentrics.net/$1 permanent; diff --git a/nginx-reverse-proxy-confs/www.staging.guide.concordia.ecentrics.net b/nginx-reverse-proxy-confs/www.staging.guide.concordia.ecentrics.net new file mode 100644 index 0000000..169ab1e --- /dev/null +++ b/nginx-reverse-proxy-confs/www.staging.guide.concordia.ecentrics.net @@ -0,0 +1 @@ +rewrite ^/(.*)$ http://staging.guide.concordia.ecentrics.net/$1 permanent; diff --git a/nginx-reverse-proxy-confs/www.staging.pinner.concordia.ecentrics.net b/nginx-reverse-proxy-confs/www.staging.pinner.concordia.ecentrics.net new file mode 100644 index 0000000..c94ffef --- /dev/null +++ b/nginx-reverse-proxy-confs/www.staging.pinner.concordia.ecentrics.net @@ -0,0 +1 @@ +rewrite ^/(.*)$ http://staging.pinner.concordia.ecentrics.net/$1 permanent;