From 73f8859452b5496813f419f14065189a839451ab Mon Sep 17 00:00:00 2001 From: Disassembler Date: Mon, 4 Dec 2017 21:51:48 +0100 Subject: [PATCH] Move Tomcat installation to basic, set listen port to 127.0.0.1:9080 --- 01-basic.sh | 14 ++ basic/etc/tomcat8/server.xml | 169 +++++++++++++++++++++++++ sigmah.sh | 6 +- sigmah/etc/nginx/apps-available/sigmah | 2 +- 4 files changed, 186 insertions(+), 5 deletions(-) create mode 100644 basic/etc/tomcat8/server.xml diff --git a/01-basic.sh b/01-basic.sh index 93b2db2..18327a2 100755 --- a/01-basic.sh +++ b/01-basic.sh @@ -142,3 +142,17 @@ systemctl restart postgresql # Install packages apt-get -y --no-install-recommends install mariadb-server + + +##### +# Tomcat +##### + +# Install packages +apt-get -y --no-install-recommends install openjdk-8-jre-headless tomcat8 + +# Configure +cp ${SOURCE_DIR}/etc/tomcat8/server.xml /etc/tomcat8/server.xml + +# Restart +systemctl restart tomcat8 diff --git a/basic/etc/tomcat8/server.xml b/basic/etc/tomcat8/server.xml new file mode 100644 index 0000000..d431128 --- /dev/null +++ b/basic/etc/tomcat8/server.xml @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sigmah.sh b/sigmah.sh index 4a972ce..1d4ab44 100755 --- a/sigmah.sh +++ b/sigmah.sh @@ -2,8 +2,8 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/sigmah -# Install Tomcat -apt-get -y --no-install-recommends install openjdk-8-jre-headless python-bcrypt tomcat8 +# Install dependencies +apt-get -y --no-install-recommends install python-bcrypt # Download Sigmah wget https://github.com/sigmah-dev/sigmah/releases/download/v2.0.2/sigmah-2.0.2.war -O /tmp/sigmah.war @@ -55,5 +55,3 @@ systemctl restart nginx # Add portal application definition portal-app-manager sigmah "/sigmah/" "${SIGMAH_ADMIN_EMAIL}" "${SIGMAH_ADMIN_PWD}" - -# TODO: Split tomcat installation, secure port 8080 diff --git a/sigmah/etc/nginx/apps-available/sigmah b/sigmah/etc/nginx/apps-available/sigmah index f4c75d7..8f3e84a 100644 --- a/sigmah/etc/nginx/apps-available/sigmah +++ b/sigmah/etc/nginx/apps-available/sigmah @@ -7,5 +7,5 @@ location /sigmah { proxy_buffering off; proxy_read_timeout 90; proxy_connect_timeout 90; - proxy_pass http://127.0.0.1:8080/sigmah; + proxy_pass http://127.0.0.1:9080/sigmah; }