Fix Apache IfVersion (#5804)

* Fix Apache IfVersion
fix https://github.com/FreshRSS/FreshRSS/issues/5803

* Minor changelog
This commit is contained in:
Alexandre Alapetite 2023-11-01 17:29:16 +01:00 committed by GitHub
parent 3b408443be
commit 0795d47d82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 10 deletions

View File

@ -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)

View File

@ -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>