Bugzilla – Attachment 19952 Details for
Bug 10646
mod_rewrite should be enabled by the postinst script
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10646: mod_rewrite should be enabled by the postinst script
Bug-10646-modrewrite-should-be-enabled-by-the-post.patch (text/plain), 2.07 KB, created by
Tomás Cohen Arazi (tcohen)
on 2013-07-25 20:23:17 UTC
(
hide
)
Description:
Bug 10646: mod_rewrite should be enabled by the postinst script
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2013-07-25 20:23:17 UTC
Size:
2.07 KB
patch
obsolete
>From 2f87d328e94334e49e3a553a7736132f0539d929 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Thu, 25 Jul 2013 17:15:17 -0300 >Subject: [PATCH] Bug 10646: mod_rewrite should be enabled by the postinst > script > >This patch makes the post install scripts used by the .deb packages >enable the mod_rewrite module (which is mandatory if you want to run Koha). > >It tests the module isn't already enabled, and enables if necesary, and reloads >Apache configuration. > >To test: >- Install current koha-common packages on a fresh setup. Make sure you have mod_rewrite >disabled (its the default if you didn't have apache and it was just pulled by koha-common >at least on Ubuntu 12.04). Run > > $ a2dismod rewrite > >to make sure it is disabled on your test box. >Create a new koha instance like this: > >$ koha-create --create-db name > >You'll get an error like this: > >Syntax error on line 76 of /etc/koha/apache-shared.conf: >Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration >Action 'configtest' failed. >The Apache error log may have more information. > ...fail! > >, build your own packages, make sure you have mod_rewrite disabled >(which is the default on Ubuntu 12.04 at least), and install the package. >Create a new instance issuing: > >- Apply the patch, build your packages, repeat: > >No apache warning about the rewrite module. > >Regards >To+ > >Sponsored-by: Universidad Nacional de Cordoba >--- > debian/koha-common.postinst | 11 +++++++++++ > 1 file changed, 11 insertions(+) > >diff --git a/debian/koha-common.postinst b/debian/koha-common.postinst >index 7fa4513..e23704a 100644 >--- a/debian/koha-common.postinst >+++ b/debian/koha-common.postinst >@@ -4,6 +4,17 @@ set -e > > . /usr/share/debconf/confmodule > >+if apachectl -M 2> /dev/null | \ >+ grep -v -q "rewrite_module" ; then >+ >+ # mod_rewrite not enabled >+ a2enmod rewrite > /dev/null 2>&1 && >+ echo "mod_rewrite enabled" >+ # reload apache config >+ service apache2 reload >+ >+fi >+ > conf=/etc/mysql/koha-common.cnf > if [ ! -e "$conf" ] && [ ! -L "$conf" ] > then >-- >1.8.1.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10646
:
19952
|
19969
|
23013
|
24072