mirror of
https://github.com/Sabai-Technologies/sogo-docker.git
synced 2026-01-23 08:32:23 +00:00
added options to use apache2 server shipped with SOGo
This commit is contained in:
parent
68bdec479d
commit
a4cdddcce1
2 changed files with 24 additions and 0 deletions
18
script/apache.sh
Executable file
18
script/apache.sh
Executable file
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source /usr/local/bin/common.sh
|
||||||
|
|
||||||
|
SERVER_NAME=${APACHE_SERVER_NAME:-localhost}
|
||||||
|
|
||||||
|
configure_apache() {
|
||||||
|
log_info "Enabling Apache Server .."
|
||||||
|
|
||||||
|
mkdir /var/log/apache2/
|
||||||
|
echo "ServerName ${SERVER_NAME}"
|
||||||
|
echo "ServerName ${SERVER_NAME}" > /etc/apache2/conf-available/servername.conf
|
||||||
|
a2enmod proxy_http
|
||||||
|
a2enconf servername
|
||||||
|
service apache2 restart
|
||||||
|
|
||||||
|
log_info "... done"
|
||||||
|
}
|
||||||
|
|
@ -17,5 +17,11 @@ if [[ -n ${MYSQL_SERVER//[[:blank:]]/} ]]; then
|
||||||
init_db
|
init_db
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ ${APACHE_ENABLED,,} = true ]]; then
|
||||||
|
source /usr/local/bin/apache.sh
|
||||||
|
configure_apache
|
||||||
|
fi
|
||||||
|
|
||||||
log_info "Launching SOGo"
|
log_info "Launching SOGo"
|
||||||
su -l sogo -s /bin/bash -c "/usr/sbin/sogod -WOWorkersCount ${WORKERS_COUNT} -WONoDetach YES -WOPort 20000 -WOLogFile - -WOPidFile /tmp/sogo.pid"
|
su -l sogo -s /bin/bash -c "/usr/sbin/sogod -WOWorkersCount ${WORKERS_COUNT} -WONoDetach YES -WOPort 20000 -WOLogFile - -WOPidFile /tmp/sogo.pid"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue