From 6500154a835c1a5d0bc006c0e86ded4c4b4b8415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Tue, 15 Nov 2016 10:29:31 +0100 Subject: [PATCH] added apache2 proxy config --- contrib/apache2/zammad.conf | 45 ++++++++++++++++++++++++++++++ contrib/packager.io/postinstall.sh | 20 ++++++------- 2 files changed, 55 insertions(+), 10 deletions(-) create mode 100644 contrib/apache2/zammad.conf diff --git a/contrib/apache2/zammad.conf b/contrib/apache2/zammad.conf new file mode 100644 index 000000000..7926d1fa9 --- /dev/null +++ b/contrib/apache2/zammad.conf @@ -0,0 +1,45 @@ +# +# this is the apache config for zammad +# + + + # replace 'localhost' with your fqdn if you want to use zammad from remote + ServerName localhost + + ## don't loose time with IP address lookups + HostnameLookups Off + + ## needed for named virtual hosts + UseCanonicalName Off + + ## configures the footer on server-generated documents + ServerSignature Off + + ProxyRequests Off + ProxyPreserveHost On + + + Order deny,allow + Allow from localhost + + + ProxyPass /assets ! + ProxyPass /favicon.ico ! + ProxyPass /robots.txt ! + ProxyPass /ws ws://localhost:6042/ + ProxyPass / http://localhost:3000/ + + DocumentRoot "/opt/zammad/public" + + + Options FollowSymLinks + AllowOverride None + + + + Options FollowSymLinks + Order allow,deny + Allow from all + + + diff --git a/contrib/packager.io/postinstall.sh b/contrib/packager.io/postinstall.sh index e4308cee3..719d93848 100755 --- a/contrib/packager.io/postinstall.sh +++ b/contrib/packager.io/postinstall.sh @@ -45,20 +45,20 @@ else # centos if [ -n "$(which postgresql-setup 2> /dev/null)" ]; then - echo "# Preparing postgresql server" - postgresql-setup initdb + echo "# Preparing postgresql server" + postgresql-setup initdb - echo "# Backuping postgres config" - test -f /var/lib/pgsql/data/pg_hba.conf.bak || cp /var/lib/pgsql/data/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf.bak + echo "# Backuping postgres config" + test -f /var/lib/pgsql/data/pg_hba.conf.bak || cp /var/lib/pgsql/data/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf.bak - echo "# Allow login via username and password in postgresql" - sed 's/ident/trust/g' < /var/lib/pgsql/data/pg_hba.conf.bak > /var/lib/pgsql/data/pg_hba.conf + echo "# Allow login via username and password in postgresql" + sed 's/ident/trust/g' < /var/lib/pgsql/data/pg_hba.conf.bak > /var/lib/pgsql/data/pg_hba.conf - echo "# Restarting postgresql server" - ${INIT_CMD} restart postgresql + echo "# Restarting postgresql server" + ${INIT_CMD} restart postgresql - echo "# Creating postgresql bootstart" - ${INIT_CMD} enable postgresql.service + echo "# Creating postgresql bootstart" + ${INIT_CMD} enable postgresql.service fi echo "# Creating zammad postgresql db"