aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-11-01 17:29:16 +0100
committerGravatar GitHub <noreply@github.com> 2023-11-01 17:29:16 +0100
commit0795d47d82391b6679605390d809b2dbe6bfc127 (patch)
tree7657992e31c6e5c55b0a625432da1feb64705d9d
parent3b408443be19b3fec766a1d14f6dbc31bb9c5434 (diff)
Fix Apache IfVersion (#5804)
* Fix Apache IfVersion fix https://github.com/FreshRSS/FreshRSS/issues/5803 * Minor changelog
-rw-r--r--CHANGELOG.md2
-rw-r--r--p/.htaccess16
2 files changed, 8 insertions, 10 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d217469a7..fef33948c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,7 +4,7 @@
* Compatibility
* Require PHP 7.4+, and implement *typed properties* [#5720](https://github.com/FreshRSS/FreshRSS/pull/5720)
- * Repair minimal compatibility with Apache 2.2, but start requiring Apache 2.4+ [#5791](https://github.com/FreshRSS/FreshRSS/pull/5791)
+ * Require Apache 2.4+ (but repair minimal compatibility with Apache 2.2) [#5791](https://github.com/FreshRSS/FreshRSS/pull/5791), [#5804](https://github.com/FreshRSS/FreshRSS/pull/5804)
* Features
* Increase SQL (`VARCHAR`) text fields length to maximum possible [#5788](https://github.com/FreshRSS/FreshRSS/pull/5788)
* Increase SQL date fields to 64-bit to be ready for year 2038+ [#5570](https://github.com/FreshRSS/FreshRSS/pull/5570)
diff --git a/p/.htaccess b/p/.htaccess
index 7bf291557..70bc34710 100644
--- a/p/.htaccess
+++ b/p/.htaccess
@@ -37,15 +37,13 @@ AddDefaultCharset UTF-8
</IfModule>
# Provide the true IP address of the connection (e.g. last proxy), even when using mod_remoteip
-<IfModule mod_setenvif.c>
- <IfVersion >= 2.4>
- # If you run an old Apache 2.2-, disable mod_setenvif and enable mod_rewrite, or edit manually
- SetEnvIfExpr "%{CONN_REMOTE_ADDR} =~ /(.*)/" CONN_REMOTE_ADDR=$1
- </IfVersion>
+<IfModule mod_rewrite.c>
+ RewriteEngine on
+ RewriteRule .* - [E=CONN_REMOTE_ADDR:%{CONN_REMOTE_ADDR}]
</IfModule>
-<IfModule !mod_setenvif.c>
- <IfModule mod_rewrite.c>
- RewriteEngine on
- RewriteRule .* - [E=CONN_REMOTE_ADDR:%{CONN_REMOTE_ADDR}]
+<IfModule !mod_rewrite.c>
+ <IfModule mod_setenvif.c>
+ # If you run an old Apache 2.2-, disable mod_setenvif and enable mod_rewrite, or comment out next line
+ SetEnvIfExpr "%{CONN_REMOTE_ADDR} =~ /(.*)/" CONN_REMOTE_ADDR=$1
</IfModule>
</IfModule>