Commit d67ef1ba authored by Benjamin Rokseth's avatar Benjamin Rokseth
Browse files

kohadev: change www apache user instead of apache module

parent b0e59a71
......@@ -13,8 +13,6 @@ services:
KOHA_RELEASE: "$KOHA_RELEASE"
networks:
- backend
depends_on:
- koha_mysql
cap_add:
- SYS_NICE
- DAC_READ_SEARCH
......
......@@ -57,6 +57,7 @@ ADD plack.psgi /etc/koha/plack.psgi
# Override with kohadev templates
ADD supervisord.conf.tmpl /templates/global/supervisord.conf.tmpl
ADD apache-envvars.tmpl /templates/global/apache-envvars.tmpl
ADD koha-conf.xml.tmpl /templates/instance/koha-conf.xml.tmpl
ADD apache.tmpl /templates/instance/apache.tmpl
......
# envvars - default environment variables for apache2ctl
# this won't be correct after changing uid
unset HOME
# for supporting multiple apache2 instances
if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then
SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}"
else
SUFFIX=
fi
export APACHE_RUN_USER=${KOHA_INSTANCE}-koha
export APACHE_RUN_GROUP=${KOHA_INSTANCE}-koha
export APACHE_PID_FILE=/run/apache2/apache2$SUFFIX.pid
export APACHE_RUN_DIR=/run/apache2$SUFFIX
export APACHE_LOCK_DIR=/run/lock/apache2$SUFFIX
# Only /var/log/apache2 is handled by /etc/logrotate.d/apache2.
export APACHE_LOG_DIR=/var/log/apache2$SUFFIX
## The locale used by some modules like mod_dav
export LANG=C
## Uncomment the following line to use the system default locale instead:
#. /etc/default/locale
export LANG
## KOHA GIT DEVELOPMENT VHOSTS
# OPAC
<VirtualHost *:8080>
<IfVersion >= 2.4>
Define instance "${KOHA_INSTANCE}"
</IfVersion>
#Include /etc/koha/apache-shared.conf
#Include /etc/koha/apache-shared-opac-git.conf
ServerName "${KOHA_INSTANCE}"
DocumentRoot /kohadev/kohaclone/koha-tmpl
<Directory "/kohadev/kohaclone">
Options All
AllowOverride All
Require all granted
Order deny,allow
Allow from All
</Directory>
RewriteEngine On
SetEnv KOHA_CONF "/etc/koha/sites/${KOHA_INSTANCE}/koha-conf.xml"
SetEnv PERL5LIB "/kohadev/kohaclone"
AssignUserID ${KOHA_INSTANCE}-koha ${KOHA_INSTANCE}-koha
ScriptAlias /cgi-bin/koha/ "/kohadev/kohaclone/opac/"
ScriptAlias /index.html "/kohadev/kohaclone/opac/opac-main.pl"
ScriptAlias /search "/kohadev/kohaclone/opac/opac-search.pl"
ScriptAlias /opac-search.pl "/kohadev/kohaclone/opac/opac-search.pl"
RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*)
RewriteRule (.+) $1?%1%2 [N,R,NE]
RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/opac-detail\.pl?bib=$1 [PT]
RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT]
RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT]
RewriteRule ^(.*)_(.*).js$ $1.js [N,L]
RewriteRule ^(.*)_(.*).css$ $1.css [N,L]
ErrorLog /var/log/koha/${KOHA_INSTANCE}/opac-error.log
# TransferLog /var/log/koha/${KOHA_INSTANCE}/opac-access.log
# RewriteLog /var/log/koha/${KOHA_INSTANCE}/opac-rewrite.log
</VirtualHost>
# INTRANET
<VirtualHost *:8081>
<IfVersion >= 2.4>
......@@ -134,7 +89,7 @@
SetEnv KOHA_CONF "/etc/koha/sites/${KOHA_INSTANCE}/koha-conf.xml"
SetEnv PERL5LIB "/kohadev/kohaclone"
AssignUserID ${KOHA_INSTANCE}-koha ${KOHA_INSTANCE}-koha
#AssignUserID ${KOHA_INSTANCE}-koha ${KOHA_INSTANCE}-koha
ScriptAlias /cgi-bin/koha/ "/kohadev/kohaclone/"
ScriptAlias /index.html "/kohadev/kohaclone/mainpage.pl"
......
......@@ -38,6 +38,7 @@ git config --global bz.default-tracker bugs.koha-community.org && \
git config --global apply.whitespace fix
echo "Koha Sites global config ..."
envsubst < /templates/global/apache-envvars.tmpl > /etc/apache2/envvars
envsubst < /templates/global/koha-sites.conf.tmpl > /etc/koha/koha-sites.conf
envsubst < /templates/global/passwd.tmpl > /etc/koha/passwd
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment