{"id":49001,"date":"2018-05-10T13:18:57","date_gmt":"2018-05-10T18:18:57","guid":{"rendered":"https:\/\/blog.cpanel.com\/?p=49001"},"modified":"2018-05-10T13:18:57","modified_gmt":"2018-05-10T18:18:57","slug":"introducing-mod_cpanel","status":"publish","type":"post","link":"https:\/\/devel.www.cpanel.net\/blog\/products\/introducing-mod_cpanel\/","title":{"rendered":"Introducing mod_cpanel"},"content":{"rendered":"
As of the second cPanel & WHM Targeted Security Release of 2018 (<\/span>TSR-2018-0002<\/a>), the\u00a0<\/span>Optimize .htaccess\u00a0<\/a>feature was<\/span>\u00a0removed<\/span>\u00a0from all supported cPanel & WHM versions<\/span>. This difficult decision was the result of some security concerns with its implementation. In its place, we have released the\u00a0mod_cpanel<\/a>\u00a0Apache module. This module will begin to improve upon the features that\u00a0Optimize .htaccess\u00a0provided.<\/p>\n When we released it, Optimize .htaccess was a function that\u00a0<\/span>was intended<\/span>\u00a0to boost server performance<\/span>.\u00a0It accomplished that using the\u00a0<\/span>AllowOverride directive<\/a>\u00a0to reduce the number of paths that Apache checks for .htaccess files<\/span>. Unfortunately, the functionality was not safe enough for shared hosting customers. There was a\u00a0possibility of breaking rewrite\/redirects, PHP inheritance, among many other things.<\/p>\n We’ve been working to replace the Optimize .htaccess feature with an Apache module (<\/span>mod_cpanel<\/a>)<\/span>.<\/p>\n mod_cpanel provides a speed boost in two ways.\u00a0Like\u00a0Optimize .htaccess, it skips directory paths (\/.htaccess, \/home\/.htaccess, \/home\/$user\/.htaccess, etc) that have already\u00a0<\/span>been checked by<\/span>\u00a0Apache<\/span>. New to cPanel is Negative Stat Caching. The mod_cpanel module will perform caching of .htaccess files that do not exist.<\/p>\n Based on our testing, the new style of .htaccess caching enabled by mod_cpanel provides a small performance improvement of about 2-4% faster response times in serving static content<\/span>.<\/p>\n In mod_cpanel’s current iteration, newly created .htaccess files may not get picked up immediately. The cache is refreshed when any of the Apache child processes are restarted. If\u00a0<\/span>Apache has already read from that directory,\u00a0it may be necessary to perform a graceful restart of the Apache service. Once that has been done, Apache will process this\u00a0<\/span>newly<\/span>\u00a0added file<\/span>. Future releases of mod_cpanel will improve that integration, preventing the need to restart Apache.<\/p>\n To install mod_cpanel,\u00a0<\/span>simply<\/span>\u00a0add ‘ea-apache24-mod_cpanel’ to your EasyApache 4 profiles. You can do this by installing the module via the WHM EasyApache 4 interface, or via yum<\/span>. There are further instructions and explanations included in the\u00a0mod_cpanel Apache module documentation<\/a>.<\/p>\n If you have any questions leave a comment below or reach out to us via the\u00a0cPanel Forum<\/a>, or\u00a0open a support ticket<\/a>\u00a0with our technical support team!<\/p>\nWhat is Optimize .htaccess and why is cPanel replacing it?<\/h2>\n
What does mod_cPanel give me as a hosting provider?<\/h2>\n
How do I take advantage of mod_cpanel?<\/h2>\n