Bug 18670 - RewriteLog and RewriteLogLevel unavailable in Apache 2.4
Summary: RewriteLog and RewriteLogLevel unavailable in Apache 2.4
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-25 04:37 UTC by David Cook
Modified: 2020-05-15 21:22 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.06, 19.05.11


Attachments
Bug 18670: Remove RewriteLog and RewriteLogLevel from sample config files (3.21 KB, patch)
2020-04-19 11:44 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 18670: Remove RewriteLog and RewriteLogLevel from sample config files (3.26 KB, patch)
2020-04-19 19:55 UTC, David Nind
Details | Diff | Splinter Review
Bug 18670: Remove RewriteLog and RewriteLogLevel from sample config files (3.33 KB, patch)
2020-05-04 13:16 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 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 2020-05-15 21:22:27 UTC
backported to 19.05.x for 19.05.11