mirror of
https://github.com/Sabai-Technologies/sogo-docker.git
synced 2026-01-23 00:24:02 +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
|
||||
fi
|
||||
|
||||
if [[ ${APACHE_ENABLED,,} = true ]]; then
|
||||
source /usr/local/bin/apache.sh
|
||||
configure_apache
|
||||
fi
|
||||
|
||||
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"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue