Initial commit - forked from the corresponding Smartfront repositories.
This commit is contained in:
30
tools/customize_apache2.sh
Normal file
30
tools/customize_apache2.sh
Normal file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Set the variables below then run this script to generate config/apache2.conf and
|
||||
# config/apache2_ssl.conf (the webserver configuration files for this service).
|
||||
# Take a revision then symlink them into the instances/.apache2 folder and reload
|
||||
# the webserver to activate.
|
||||
|
||||
PAR_ACMEHOST="localhost"
|
||||
PAR_ACMEPORT="8100"
|
||||
PAR_LOCATION=""
|
||||
PAR_SERVICE="$HOME/services/servicename"
|
||||
PAR_PROXYHOST="localhost"
|
||||
PAR_PROXYPORT="8201"
|
||||
PAR_SERVERNAME="www.example.com"
|
||||
PAR_LOCATION=""
|
||||
|
||||
# Do not change anything below.
|
||||
PARAMETERS='$PAR_ACMEHOST:$PAR_ACMEPORT:$PAR_SERVICE:$PAR_PROXYHOST:$PAR_PROXYPORT'
|
||||
PARAMETERS+=':$PAR_SERVERNAME:$PAR_LOCATION'
|
||||
for parameter in $(echo "$PARAMETERS" | tr ":" "\n")
|
||||
do export ${parameter:1}; done
|
||||
cat "$PAR_SERVICE/.templates/apache2/apache2.conf" | envsubst "$PARAMETERS" \
|
||||
> "$PAR_SERVICE/configs/apache2.conf"
|
||||
|
||||
|
||||
PARAMETERS+=""
|
||||
for parameter in $(echo "$PARAMETERS" | tr ":" "\n")
|
||||
do export ${parameter:1}; done
|
||||
cat "$PAR_SERVICE/.templates/apache2/apache2_ssl.conf" | envsubst "$PARAMETERS" \
|
||||
> "$PAR_SERVICE/configs/apache2_ssl.conf"
|
Reference in New Issue
Block a user