{"id":1707,"date":"2017-09-01T08:58:43","date_gmt":"2017-09-01T12:58:43","guid":{"rendered":"https:\/\/easy-admin.ca\/?p=1707"},"modified":"2017-09-19T19:02:29","modified_gmt":"2017-09-19T23:02:29","slug":"apache-mod_sec-413-request-entity-too-large","status":"publish","type":"post","link":"https:\/\/easy-admin.ca\/index.php\/2017\/09\/01\/apache-mod_sec-413-request-entity-too-large\/","title":{"rendered":"APACHE + MOD_SEC 413 or 44 ~ Request Entity Too Large ;-)"},"content":{"rendered":"<p><em>My friend<\/em> ran into a problem with my CENTOS Server. The problem was related to a error in Opencart.<\/p>\n<p><strong>&#8220;Error 413 Request Entity is Too Large&#8230;&#8221;<\/strong><\/p>\n<p>You need to edit <strong>mod_security.conf<\/strong> to fix this issue<\/p>\n<p>\/etc\/httpd\/conf.d\/mod_security.conf<\/p>\n<p>Locate this part near the top of the configuration<\/p>\n<p># Default recommended configuration<br \/>\n<span style=\"color: #ff0000;\">SecRuleEngine On <span style=\"color: #000000;\">&#8220;You may turn this Off, until you fix thing, <strong>but put it back On<\/strong>&#8220;<\/span><\/span><br \/>\nSecRequestBodyAccess On<br \/>\nSecRule REQUEST_HEADERS:Content-Type &#8220;text\/xml&#8221; \\<br \/>\n&#8220;id:&#8217;200000&#8242;,phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=XML&#8221;<br \/>\n<strong>SecRequestBodyLimit<\/strong> 531072<br \/>\n<strong>SecRequestBodyNoFilesLimit<\/strong> 531072<br \/>\nSecRequestBodyInMemoryLimit 531072<br \/>\nSecRequestBodyLimitAction Reject<\/p>\n<p><strong>Now change the value of those two configuration<\/strong><\/p>\n<p><strong>SecRequestBodyLimit<\/strong> 2147483647\u00a0\u00a0 (2GB unlimited value)<br \/>\n<strong>SecRequestBodyNoFilesLimit<\/strong> 5242880\u00a0 (This will fix the 413 error)<br \/>\nSecRequestBodyInMemoryLimit 531072<br \/>\nSecRequestBodyLimitAction Reject<\/p>\n<p><strong>Restart Apache<\/strong><\/p>\n<p><span style=\"color: #ff0000;\">systemctl restart httpd<\/span><\/p>\n<p><em><strong>ENJOY!<\/strong><\/em><\/p>\n<p><em>Cheers Dejan from SERBIA! TEAMWORK!!! <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1762\" src=\"https:\/\/easy-admin.ca\/wp-content\/uploads\/2017\/09\/beer.png\" alt=\"\" width=\"34\" height=\"40\" \/><br \/>\n<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>My friend ran into a problem with my CENTOS Server. The problem was related to a error in Opencart. &#8220;Error 413 Request Entity is Too Large&#8230;&#8221; You need to edit mod_security.conf to fix this issue \/etc\/httpd\/conf.d\/mod_security.conf Locate this part near the top of the configuration # Default recommended configuration SecRuleEngine On &#8220;You may turn this &hellip; <a href=\"https:\/\/easy-admin.ca\/index.php\/2017\/09\/01\/apache-mod_sec-413-request-entity-too-large\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">APACHE + MOD_SEC 413 or 44 ~ Request Entity Too Large \ud83d\ude09<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1707","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/posts\/1707","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/comments?post=1707"}],"version-history":[{"count":0,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/posts\/1707\/revisions"}],"wp:attachment":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/media?parent=1707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/categories?post=1707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/tags?post=1707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}