ソースを参照

Fix Apache IfVersion (#5804)

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

* Minor changelog
Alexandre Alapetite 2 年 前
コミット
0795d47d82
2 ファイル変更8 行追加10 行削除
  1. 1 1
      CHANGELOG.md
  2. 7 9
      p/.htaccess

+ 1 - 1
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)

+ 7 - 9
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>