Bug 18670

Summary: RewriteLog and RewriteLogLevel unavailable in Apache 2.4
Product: Koha Reporter: David Cook <dcook>
Component: Architecture, internals, and plumbingAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: 1joynelson, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.06, 19.05.11
Circulation function:
Attachments: Bug 18670: Remove RewriteLog and RewriteLogLevel from sample config files
Bug 18670: Remove RewriteLog and RewriteLogLevel from sample config files
Bug 18670: Remove RewriteLog and RewriteLogLevel from sample config files

Description David Cook 2017-05-25 04:37:03 UTC
We have a few commented out RewriteLog and RewriteLogLevel directives in various Apache configuration files and templates. These directives aren't used in Apache 2.4. They've been replaced with the LogLevel directive. 

Since they're commented out, I don't think it matters too much for production systems, but it could lead to confusion if people tried uncommenting them and they don't work (yep that was me). 

We could wrap the two different styles in IfVersion directives to make things easier for people.
Comment 1 Katrin Fischer 2019-02-10 01:53:45 UTC
The lines still appear:

debian/templates/apache-site-https.conf.in:#  RewriteLog  /var/log/koha/__KOHASITE__/opac-rewrite.log
debian/templates/apache-site-https.conf.in:#  RewriteLog  /var/log/koha/__KOHASITE__/intranet-rewrite.log
debian/templates/apache-site.conf.in:#  RewriteLog  /var/log/koha/__KOHASITE__/opac-rewrite.log
debian/templates/apache-site.conf.in:#  RewriteLog  /var/log/koha/__KOHASITE__/intranet-rewrite.log
etc/koha-httpd.conf:     #RewriteLog __LOG_DIR__/koha-opac-rewrite.log
etc/koha-httpd.conf:     #RewriteLogLevel 1
etc/koha-httpd.conf:     #RewriteLog __LOG_DIR__/koha-intranet-rewrite.log
etc/koha-httpd.conf:     #RewriteLogLevel 1
Comment 2 Katrin Fischer 2020-04-19 11:37:06 UTC
I'll attach a patch removing the commented lines to get this moving, but others might be able to tell better than me if this is a good idea or not :)
Comment 3 Katrin Fischer 2020-04-19 11:44:13 UTC
Created attachment 103212 [details] [review]
Bug 18670: Remove RewriteLog and RewriteLogLevel from sample config files

It looks like RewriteLog will no longer work with Apache 2.4 and later.

RewriteLog
Those familiar with earlier versions of mod_rewrite will
no doubt be looking for the RewriteLog and RewriteLogLevel
directives. This functionality has been completely replaced
by the new per-module logging configuration mentioned above.
http://httpd.apache.org/docs/current/mod/mod_rewrite.html

All lines removed were commented out, so there should be
no change in behaviour or side effects.

To test.
- Verify every mention of RewriteLog has been removed from Koha
- Verify patch by reading it
Comment 4 David Nind 2020-04-19 19:55:03 UTC
Created attachment 103224 [details] [review]
Bug 18670: Remove RewriteLog and RewriteLogLevel from sample config files

It looks like RewriteLog will no longer work with Apache 2.4 and later.

RewriteLog
Those familiar with earlier versions of mod_rewrite will
no doubt be looking for the RewriteLog and RewriteLogLevel
directives. This functionality has been completely replaced
by the new per-module logging configuration mentioned above.
http://httpd.apache.org/docs/current/mod/mod_rewrite.html

All lines removed were commented out, so there should be
no change in behaviour or side effects.

To test.
- Verify every mention of RewriteLog has been removed from Koha
- Verify patch by reading it

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Jonathan Druart 2020-05-04 13:16:51 UTC
Created attachment 104279 [details] [review]
Bug 18670: Remove RewriteLog and RewriteLogLevel from sample config files

It looks like RewriteLog will no longer work with Apache 2.4 and later.

RewriteLog
Those familiar with earlier versions of mod_rewrite will
no doubt be looking for the RewriteLog and RewriteLogLevel
directives. This functionality has been completely replaced
by the new per-module logging configuration mentioned above.
http://httpd.apache.org/docs/current/mod/mod_rewrite.html

All lines removed were commented out, so there should be
no change in behaviour or side effects.

To test.
- Verify every mention of RewriteLog has been removed from Koha
- Verify patch by reading it

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Martin Renvoize (ashimema) 2020-05-05 10:04:16 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 7 Joy Nelson 2020-05-11 21:24:53 UTC
Backported to 19.11.x for 19.11.06
Comment 8 Lucas Gass (lukeg) 2020-05-15 21:22:27 UTC
backported to 19.05.x for 19.05.11