{"id":822,"date":"2016-11-17T14:22:07","date_gmt":"2016-11-17T19:22:07","guid":{"rendered":"http:\/\/easy-admin.ca\/?p=822"},"modified":"2017-08-21T10:08:39","modified_gmt":"2017-08-21T14:08:39","slug":"you-dont-have-permission-to-access-in-opencart","status":"publish","type":"post","link":"https:\/\/easy-admin.ca\/index.php\/2016\/11\/17\/you-dont-have-permission-to-access-in-opencart\/","title":{"rendered":"You don&#8217;t have permission to access \/index.php on this server OpenCart + CentOS + Apache + MOD_SECURITY"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-823 size-full\" src=\"https:\/\/easy-admin.ca\/wp-content\/uploads\/2016\/11\/oc-strange-bug.jpg\" alt=\"oc-strange-bug\" width=\"888\" height=\"533\" srcset=\"https:\/\/easy-admin.ca\/wp-content\/uploads\/2016\/11\/oc-strange-bug.jpg 888w, https:\/\/easy-admin.ca\/wp-content\/uploads\/2016\/11\/oc-strange-bug-300x180.jpg 300w, https:\/\/easy-admin.ca\/wp-content\/uploads\/2016\/11\/oc-strange-bug-768x461.jpg 768w\" sizes=\"auto, (max-width: 888px) 100vw, 888px\" \/><\/p>\n<p>I noticed a problem after migrating a <strong>Opencart v2<\/strong> project to a new server.\u00a0 (<em>Special thanks to <a href=\"http:\/\/dejanjanosevic.info\/\">Dejan<\/a><\/em>)<\/p>\n<p><strong>Server Specs :<\/strong> HP Proliant Blade Server G7\u00a0Dual XEON ~ 24 Cores<\/p>\n<p><strong>Running :<\/strong> CentOS 7.x \/ Webmin \/ Apache \/ MySQL \/ CSF \/ MOD_SEC<\/p>\n<p>I ran into a problem when I was adding multiple products at the same time into the cart &#8220;A fresh OpenCart Install&#8221;. After the third click on Add to Cart&#8230; I received this error!<\/p>\n<p><strong>Forbidden &#8220;You don&#8217;t have permission to access \/&#8230;\/index.php&#8221;<\/strong><\/p>\n<p>After reading a lot of blog&#8217;s on this subject and many tests,,&#8230; I found out that this was caused by the server!<\/p>\n<p><strong>This apply only<\/strong> if you have installed <strong>MOD_SECURITY<\/strong> on your Apache Server.<\/p>\n<p><strong>How to fix this?<\/strong><\/p>\n<p>Open the following configuration file \/etc\/httpd\/conf.f\/mod_evasive.conf<\/p>\n<p><strong># mod_evasive configuration<\/strong><br \/>\nLoadModule evasive20_module modules\/mod_evasive24.so<\/p>\n<p><strong>&lt;IfModule mod_evasive24.c&gt;<\/strong><br \/>\n# The hash table size defines the number of top-level nodes for each<br \/>\n# child&#8217;s hash table.\u00a0 Increasing this number will provide faster<br \/>\n# performance by decreasing the number of iterations required to get to the<br \/>\n# record, but consume more memory for table space.\u00a0 You should increase<br \/>\n# this if you have a busy web server.\u00a0 The value you specify will<br \/>\n# automatically be tiered up to the next prime number in the primes list<br \/>\n# (see mod_evasive.c for a list of primes used).<br \/>\nDOSHashTableSize\u00a0\u00a0\u00a0 3097<\/p>\n<p># This is the threshhold for the number of requests for the same page (or<br \/>\n# URI) per page interval.\u00a0 Once the threshhold for that interval has been<br \/>\n# exceeded, the IP address of the client will be added to the blocking<br \/>\n# list.<br \/>\n<strong>DOSPageCount\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: #ff0000;\">3\u00a0 &#8220;CHANGE THIS TO 12&#8221;<\/span><\/strong><\/p>\n<p># This is the threshhold for the total number of requests for any object by<br \/>\n# the same client on the same listener per site interval.\u00a0 Once the<br \/>\n# threshhold for that interval has been exceeded, the IP address of the<br \/>\n# client will be added to the blocking list.<br \/>\nDOSSiteCount\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 50<\/p>\n<p>Save the .conf file and then restart your Apache Server<\/p>\n<p><em><strong>Et voil\u00e0!<\/strong><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I noticed a problem after migrating a Opencart v2 project to a new server.\u00a0 (Special thanks to Dejan) Server Specs : HP Proliant Blade Server G7\u00a0Dual XEON ~ 24 Cores Running : CentOS 7.x \/ Webmin \/ Apache \/ MySQL \/ CSF \/ MOD_SEC I ran into a problem when I was adding multiple products &hellip; <a href=\"https:\/\/easy-admin.ca\/index.php\/2016\/11\/17\/you-dont-have-permission-to-access-in-opencart\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">You don&#8217;t have permission to access \/index.php on this server OpenCart + CentOS + Apache + MOD_SECURITY<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"You don't have permission to access \/index.php on this server OpenCart + CentOS + Apache + MOD_SECURITY - HP Server","description":"I noticed a problem after migrating a Opencart v2 project to a new server.\u00a0 ( Special thanks to Dejan ) Server Specs : HP Proliant Blade Server G7\u00a0Dual XEON ~ 2"},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-822","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/posts\/822","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=822"}],"version-history":[{"count":0,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/posts\/822\/revisions"}],"wp:attachment":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/media?parent=822"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/categories?post=822"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/tags?post=822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}