把網站主機從舊的使用 plesk-migration之後,使用avada的live editor,竟然出現

500 Internal Server Error

還沒想到是什麼問題,還以為是沒轉移好。

後來想到去log看看,發現是ModSecurity搞的鬼。

ModSecurity: Output filter: Response body too large (over limit of 1048576, total not specified). [hostname “blog.connie-brian.com”] [uri “/index.php“] [unique_id “YNwq2OXU6rQFLYR@tp@tvgAAAII”], referer: https://blog.connie-brian.com/wp-admin/edit.php

查看了ModSecurity的 log之後,確認是什麼問題,再想想辦法把他排除掉了。

–9b32ed4e-F–
HTTP/1.1 500 Internal Server Error
X-Powered-By: PHP/7.3.28
Vary: Accept-Encoding,Cookie
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate
Pragma: no-cache
Link: <https://blog.connie-brian.com/wp-json/>; rel=”https://api.w.org/”, <https://blog.connie-brian.com/wp-json/wp/v2/pages/2515>; rel=”alternate”; type=”application/json”, <https://blog.connie-brian.com/>; rel=shortlink
Last-Modified: Sat, 05 May 2018 14:41:51 GMT
ETag: “45e-56b766fe386d8”
Accept-Ranges: bytes
Content-Length: 1118
Connection: close
Content-Type: text/html

–9b32ed4e-H–
Message: Output filter: Response body too large (over limit of 1048576, total not specified).
Apache-Error: [file “apache2_util.c”] [line 271] [level 3]  ModSecurity: Output filter: Response body too large (over limit of 1048576, total not specified). [hostname “blog.connie-brian.com”] [uri “/index.php”] [unique_id “YNwsJuXU6rQFLYR@tp@t-gAAAIw”]
Apache-Error: [file “mod_proxy_fcgi.c”] [line 975] [level 3] [status 20014] AH01075: Error dispatching request to : (passing brigade to output filters)
Stopwatch: 1625041958884008 1250784 (- – -)
Stopwatch2: 1625041958884008 1250784; combined=13019, p1=598, p2=11954, p3=175, p4=0, p5=194, sr=353, sw=98, l=0, gc=0
Producer: ModSecurity for Apache/2.9.3 (http://www.modsecurity.org/); CWAF_Apache.
Server: Apache
WebApp-Info: “default” “285df8c08acbcc5db407b1e0bd065902” “-”
Engine-Mode: “ENABLED”

–9b32ed4e-Z–

參考解決方法:

把 SecResponseBodyLimit 加大

https://talk.plesk.com/threads/mod_security-error-response-body-too-large.350523/

 

To fix the issue, try to add the following lines in Domains >domain.com > Apache & nginx Settings > Additional directives for HTTP:

<IfModule mod_security2.c>
SecResponseBodyLimit 546870912
</IfModule>

And pressed apply.

Views: 42