diff options
Diffstat (limited to 'installation/sdnc-web')
-rw-r--r-- | installation/sdnc-web/src/main/resources/http_site.conf | 9 | ||||
-rw-r--r-- | installation/sdnc-web/src/main/resources/https_site.conf | 8 | ||||
-rw-r--r-- | installation/sdnc-web/src/main/scripts/run.sh | 42 |
3 files changed, 57 insertions, 2 deletions
diff --git a/installation/sdnc-web/src/main/resources/http_site.conf b/installation/sdnc-web/src/main/resources/http_site.conf index e42ecc79..dd641418 100644 --- a/installation/sdnc-web/src/main/resources/http_site.conf +++ b/installation/sdnc-web/src/main/resources/http_site.conf @@ -48,8 +48,15 @@ server { index index.html index.htm index.nginx-debian.html; server_name _; - + set $sdnrserver "SDNRHOST"; + + location ~ ^/$ { + return 301 /odlux/index.html; + } + location ~ /help/$ { + try_files /help/$args.json $uri; + } location / { try_files $uri $uri/ @backend; } diff --git a/installation/sdnc-web/src/main/resources/https_site.conf b/installation/sdnc-web/src/main/resources/https_site.conf index 11ba7288..49afa079 100644 --- a/installation/sdnc-web/src/main/resources/https_site.conf +++ b/installation/sdnc-web/src/main/resources/https_site.conf @@ -69,7 +69,13 @@ server { server_name _; set $sdnrserver "SDNRHOST"; - + + location ~ ^/$ { + return 301 /odlux/index.html; + } + location ~ /help/$ { + try_files /help/$args.json $uri; + } location / { try_files $uri $uri/ @backend; } diff --git a/installation/sdnc-web/src/main/scripts/run.sh b/installation/sdnc-web/src/main/scripts/run.sh index d2489ea0..544dd473 100644 --- a/installation/sdnc-web/src/main/scripts/run.sh +++ b/installation/sdnc-web/src/main/scripts/run.sh @@ -23,5 +23,47 @@ /opt/bitnami/nginx/sbin/configure.sh +echo "starting sdnc-web" +echo "=================" +echo " WEBPROTOCOL: $WEBPROTOCOL" +echo " WEBPORT: $WEBPORT" +echo " SDNRPROTOCOL: $SDNRPROTOCOL" +echo " SDNRHOST: $SDNRHOST" +echo " SDNRPORT: $SDNRPORT" +echo " LOCALDNS: $LOCALDNS" +echo " SSL_CERT_DIR: $SSL_CERT_DIR" +echo -n " SSL_CERTIFICATE: $SSL_CERTIFICATE" +if [ -f "$SSL_CERTIFICATE" ]; then +echo " (exists)" +else +echo " (missing)" +fi +echo -n " SSL_CERTIFICATE_KEY: $SSL_CERTIFICATE_KEY" +if [ -f "$SSL_CERTIFICATE_KEY" ]; then +echo " (exists)" +else +echo " (missing)" +fi +echo "" + +if [ ! -z "$DEBUG" ]; then + + if [ -f "/opt/bitnami/nginx/conf/server_blocks/http_site.conf" ]; then + echo "content of /opt/bitnami/nginx/conf/server_blocks/http_site.conf" + echo "===============================================================" + cat /opt/bitnami/nginx/conf/server_blocks/http_site.conf + echo "===============================================================" + fi + + if [ -f "/opt/bitnami/nginx/conf/server_blocks/https_site.conf" ]; then + echo "content of /opt/bitnami/nginx/conf/server_blocks/https_site.conf" + echo "===============================================================" + cat /opt/bitnami/nginx/conf/server_blocks/https_site.conf + echo "===============================================================" + fi + + #tail -f /opt/bitnami/nginx/logs/* & +fi + # Call the base images' run.sh to start NGINX bash /run.sh
\ No newline at end of file |