Skip to content

Commit 454be9e

Browse files
author
Jonathan Starck
committed
limesurvey: enable Apache mod_rewrite on update
Containers created before the install fix have mod_rewrite disabled, and LimeSurvey updates itself through the web interface, so nothing in the existing update path would ever repair them. Enable the module from the update script and restart Apache, guarded by the mods-enabled symlink so an already working container is left alone and no service is restarted for nothing.
1 parent 779c978 commit 454be9e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

ct/limesurvey.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ function update_script() {
2828
msg_error "No ${APP} Installation Found!"
2929
exit
3030
fi
31+
32+
# mod_rewrite is required by the shipped .htaccess (for upgrades from older versions)
33+
if [[ ! -L /etc/apache2/mods-enabled/rewrite.load ]]; then
34+
msg_info "Enabling Apache mod_rewrite"
35+
$STD a2enmod rewrite
36+
systemctl restart apache2
37+
msg_ok "Enabled Apache mod_rewrite"
38+
fi
39+
3140
setup_mariadb
3241

3342
msg_warn "Application is updated via Web Interface"

0 commit comments

Comments
 (0)