summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Sepulveda <javier.sepulveda@uv.es>2023-08-05 11:49:14 +0200
committerJavier Sepulveda <javier.sepulveda@uv.es>2023-08-05 11:49:14 +0200
commit26b24ebdd2b79ddded06812131c04a625fa17065 (patch)
tree5832b22021ad2056c318e6cb5b48de012bb45228
parent690255f4d25fdabfd77936a555810b6cd0cfea50 (diff)
downloaddeployment-26b24ebdd2b79ddded06812131c04a625fa17065.tar.gz
deployment-26b24ebdd2b79ddded06812131c04a625fa17065.tar.bz2
deployment-26b24ebdd2b79ddded06812131c04a625fa17065.zip
Improving the README file
-rw-r--r--sandcastle/README126
-rw-r--r--sandcastle/nginx-example.conf10
2 files changed, 7 insertions, 129 deletions
diff --git a/sandcastle/README b/sandcastle/README
index 02ba1f2..0623d13 100644
--- a/sandcastle/README
+++ b/sandcastle/README
@@ -205,122 +205,10 @@ NOTE: localhost works only with the default ports exposed.
How to deploy to online sites
=============================
-Assuming that TLS is already configured, the following
-Nginx configuration example deploys this sandbox under
-"example.com":
-
- server {
- server_name exchange.example.com;
- listen 443 ssl;
- listen [::]:443 ssl;
- root /dev/null;
-
- location / {
- proxy_pass http://localhost:5555/;
- proxy_redirect off;
- proxy_set_header Host $host;
- }
- }
-
- server {
- server_name backend.example.com;
- listen 443 ssl;
- listen [::]:443 ssl;
-
- location / {
- proxy_set_header X-Forwarded-Host "backend.example.com";
- proxy_set_header X-Forwarded-Proto "https";
- proxy_set_header X-Forwarded-Prefix "/";
- proxy_pass http://localhost:5556/;
- proxy_redirect off;
- proxy_set_header Host $host;
- }
- }
-
- server {
- server_name webui-bank.example.com;
- listen 443 ssl;
- listen [::]:443 ssl;
-
- location = / {
- # Serves the SPA
- index index.html;
- proxy_pass http://localhost:15002/;
- }
- }
-
- server {
- server_name bank.example.com;
- listen 443 ssl;
- listen [::]:443 ssl;
-
- location / {
- proxy_set_header X-Forwarded-Host "bank.example.com";
- proxy_set_header X-Forwarded-Proto "https";
- proxy_set_header X-Forwarded-Prefix /;
- proxy_pass http://localhost:15000/;
- }
- }
-
- server {
- server_name blog.example.com;
- listen 443 ssl;
- listen [::]:443 ssl;
-
- location / {
- proxy_set_header X-Forwarded-Host "blog.example.com";
- proxy_set_header X-Forwarded-Proto "https";
- proxy_set_header X-Forwarded-Prefix /;
- proxy_pass http://localhost:5559/;
- }
- }
-
- server {
- server_name donations.example.com;
- listen 443 ssl;
- listen [::]:443 ssl;
-
- location / {
- proxy_set_header X-Forwarded-Host "donations.example.com";
- proxy_set_header X-Forwarded-Proto "https";
- proxy_set_header X-Forwarded-Prefix /;
- proxy_pass http://localhost:5560/;
- }
- }
-
- server {
- server_name survey.example.com;
- listen 443 ssl;
- listen [::]:443 ssl;
-
- location / {
- proxy_set_header X-Forwarded-Host "survey.example.com";
- proxy_set_header X-Forwarded-Proto "https";
- proxy_set_header X-Forwarded-Prefix /;
- proxy_pass http://localhost:5561/;
- }
- }
-
- # Landing page that explains the demo.
- server {
- server_name intro.example.com;
- listen 443 ssl;
- listen [::]:443 ssl;
-
- location / {
- proxy_pass http://localhost:5562/;
- }
- }
-
- server {
- server_name sync.example.com;
- listen 443 ssl;
- listen [::]:443 ssl;
-
- location / {
- proxy_set_header X-Forwarded-Host "sync.example.com";
- proxy_set_header X-Forwarded-Proto "https";
- proxy_set_header X-Forwarded-Prefix /;
- proxy_pass http://localhost:5563/;
- }
- }
+Assuming that TLS is already configured, you can use the file named "nginx-example.conf" on the sandcastle directory,
+as a NGINX virtual host, replacing the domain name "example.com" with your own domain name.
+
+You can use the the SED command to replace this automatically as this, bein located within the sandcastle directory:
+
+sed -i "s/example.com/yourdomain.com/g" nginx-example.conf
+
diff --git a/sandcastle/nginx-example.conf b/sandcastle/nginx-example.conf
index 1131b51..b43e49b 100644
--- a/sandcastle/nginx-example.conf
+++ b/sandcastle/nginx-example.conf
@@ -59,8 +59,6 @@
server {
server_name bank.example.com;
-## NEED TO ADD IT AFTERWARDS
-
location = / {
return 301 https://bank.example.com/webui;
@@ -82,14 +80,6 @@
proxy_set_header X-Forwarded-Prefix "/";
}
-## END NEEDED TO ADD AFTERWARDS
-
- #location / {
- # proxy_set_header X-Forwarded-Host "bank.example.com";
- #proxy_set_header X-Forwarded-Proto "https";
- #proxy_set_header X-Forwarded-Prefix /;
- #proxy_pass http://localhost:15000/;
- #}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/backend.example.com/fullchain.pem; # managed by Certbot