{"id":2309,"date":"2021-08-16T10:46:16","date_gmt":"2021-08-16T15:46:16","guid":{"rendered":"https:\/\/www.knownhost.com\/kb\/?p=2309"},"modified":"2026-05-13T09:51:29","modified_gmt":"2026-05-13T14:51:29","slug":"cpanel-directadmin-webservers-php","status":"publish","type":"post","link":"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/","title":{"rendered":"cPanel and DirectAdmin: Webservers &#038; PHP"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_83 ez-toc-wrap-right counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #212121;color:#212121\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #212121;color:#212121\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/#the_webserver_and_php_implementation\" >The Webserver and PHP Implementation<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/#custombuild_versus_easyapache\" >CustomBuild versus EasyApache<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/#major_pros_cons_of_each\" >Major Pros &amp; Cons of Each<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/#supported_webservers\" >Supported Webservers<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/#usage_via_a_graphical_interface\" >Usage via a Graphical Interface<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/#command_line_usage\" >Command Line Usage<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/#customizations\" >Customizations<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/#webserver\" >Webserver<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/#php\" >PHP<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/#conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<div class=\"kb-shortcode kb-shortcode_info\">\n                    <div class=\"kb-shortcode-icon\">\n                        <i class=\"fa fa-info-circle fa-2x\"><\/i>\n                    <\/div>\n                    <div class=\"kb-shortcode-content_info\"><center><\/p>\n<p>cPanel and DirectAdmin Comparison<\/p>\n<p><\/center><\/p>\n<ol>\n<\/p>\n<li><a href=\"https:\/\/www.knownhost.com\/kb\/cpanel-and-directadmin-the-basics\/\">cPanel &amp; DirectAdmin: The Basics<\/a><\/li>\n<li>cPanel &amp; DirectAdmin: Webservers &amp; PHP<\/li>\n<li><a href=\"https:\/\/www.knownhost.com\/kb\/cpanel-and-directadmin-sql-dns-email-backups-the-rest\/\">cPanel &amp; DirectAdmin: SQL, DNS and Email<\/a><\/li>\n<li><a href=\"https:\/\/www.knownhost.com\/kb\/cpanel-and-directadmin-development-log-locations\/\">cPanel &amp; DirectAdmin: Development &amp; Log Locations<\/a><\/li>\n<\/ol>\n<\/div>\n                <\/div>\n\n\n\n<p>cPanel and Directadmin both offer methods of implementing PHP and Webserver changes, modules and\/or configurations.  We&#8217;ll go into each respective methods of handling this and how they go about it while providing relevant information that you may or may not find as useful as we did. \ud83d\ude42<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"the_webserver_and_php_implementation\"><span class=\"ez-toc-section\" id=\"the_webserver_and_php_implementation\"><\/span>The Webserver and PHP Implementation<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Because the PHP handler one can use depends on what webserver has been selected, one cannot really manage PHP&#8217;s configuration without also considering the webserver configuration. These are heavily interdependent on one another. Thus it makes sense for major panels to combine the management of both into a single task. This is smart because it allows the panel to prevent incompatible setups from even being attempted, much less built and deployed.<\/p>\n\n\n\n<p>For DirectAdmin, PHP and webserver management is handled by CustomBuild. For cPanel, it is EasyApache.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"custombuild_versus_easyapache\"><span class=\"ez-toc-section\" id=\"custombuild_versus_easyapache\"><\/span>CustomBuild versus EasyApache<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Both systems are equally adept at what they do. Which you&#8217;d prefer depends on your priorities. Both systems support multiple versions of PHP, and both can integrate flawlessly with Cloudlinux to be able to use the secured&nbsp;EOL&nbsp;PHP versions CloudLinux offers as well. If you&#8217;d prefer to be able to quickly make changes to the configuration, then EA is for you, but if you prefer more control to be able to build your configuration with custom modules, then CB is for you. Also, CustomBuild is actually used to manage all software installations on the server, such as MySQL, Roundcube, ClamAV, and many more. A single CustomBuild instance could be used to update many different software installations.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"major_pros_cons_of_each\"><span class=\"ez-toc-section\" id=\"major_pros_cons_of_each\"><\/span>Major Pros &amp; Cons of Each<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><td><\/td><th>Pro<\/th><th>Con<\/th><\/tr><\/thead><tbody><tr><th>DirectAdmin<\/th><td>Many different software installations are highly extendable thanks to being built from source<\/td><td>Building from source is slow<\/td><\/tr><tr><th>cPanel<\/th><td>Changes can be made very, very fast to PHP and the webserver<\/td><td>Pre-built RPMs mean a limited set of RMS and thus less custom modules<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"supported_webservers\"><span class=\"ez-toc-section\" id=\"supported_webservers\"><\/span>Supported Webservers<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th>DIRECTADMIN<\/th><th>CPANEL<\/th><\/tr><\/thead><tbody><tr><td>Apache<\/td><td>Apache<\/td><\/tr><tr><td>Nginx<\/td><td>Nginx<\/td><\/tr><tr><td>Nginx Reverse Proxy + Apache<\/td><td>N\/A<\/td><\/tr><tr><td>Litespeed (requires paid license)<\/td><td>Litespeed (requires paid license)<\/td><\/tr><tr><td><meta http-equiv=\"content-type\" content=\"text\/html; charset=utf-8\">OpenLitespeed<\/td><td><meta http-equiv=\"content-type\" content=\"text\/html; charset=utf-8\">N\/A<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"usage_via_a_graphical_interface\"><span class=\"ez-toc-section\" id=\"usage_via_a_graphical_interface\"><\/span>Usage via a Graphical Interface<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>CustomBuild has long been used via the command line, but many aren&#8217;t comfortable using a terminal, so DirectAdmin now supports a CustomBuild&nbsp;GUI&nbsp;plugin. See here: <a href=\"https:\/\/forum.directadmin.com\/showthread.php?t=48989\">CustomBuild 2.0<\/a><\/p>\n\n\n\n<div id=\"block-87a7db-3995-43\" class=\"wp-block-gutenbee-slideshow block-87a7db-3995-43\" data-fade=\"true\" data-autoplay=\"false\" data-arrows=\"true\" data-dots=\"true\" data-infinite=\"true\" data-speed=\"300\" data-autoplay-speed=\"3000\" data-slides-to-show=\"1\" data-slides-to-scroll=\"1\" data-pause-on-hover=\"true\" style=\"color:#ffffff\" data-dots-color=\"#FFFFFF\" data-arrows-color=\"#ffffff\"><style>.wp-block-gutenbee-slideshow.block-87a7db-3995-43 button.slick-arrow { background-color: #000000; }<\/style><div class=\"gutenbee-slideshow-item\"><img decoding=\"async\" src=\"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/08\/custombuildgui-editoptions-php.png\" alt=\"webservers directadmin\" data-id=\"2311\" data-link=\"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/custombuildgui-editoptions-php\/\"\/><\/div><div class=\"gutenbee-slideshow-item\"><img decoding=\"async\" src=\"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/08\/custombuildgui-buildsoftware.png\" alt=\"\" data-id=\"2312\" data-link=\"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/custombuildgui-buildsoftware\/\"\/><\/div><\/div>\n\n\n\n<p>EasyApache has long supported usage via both the command line and via WHM&#8217;s EasyApache interface. EasyApache 4 is essentially a graphical interface for yum.<\/p>\n\n\n\n<div id=\"block-d94e74-e675-41\" class=\"wp-block-gutenbee-slideshow block-d94e74-e675-41\" data-fade=\"true\" data-autoplay=\"false\" data-arrows=\"true\" data-dots=\"true\" data-infinite=\"true\" data-speed=\"300\" data-autoplay-speed=\"3000\" data-slides-to-show=\"1\" data-slides-to-scroll=\"1\" data-pause-on-hover=\"true\" style=\"color:#FFFFFF\" data-dots-color=\"#FFFFFF\" data-arrows-color=\"#FFFFFF\"><style>.wp-block-gutenbee-slideshow.block-d94e74-e675-41 button.slick-arrow { background-color: #000000; }<\/style><div class=\"gutenbee-slideshow-item\"><img decoding=\"async\" src=\"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/08\/eaphpselectioninterface.png\" alt=\"\" data-id=\"2313\" data-link=\"https:\/\/www.knownhost.com\/kb\/?attachment_id=2313\"\/><\/div><div class=\"gutenbee-slideshow-item\"><img decoding=\"async\" src=\"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/08\/ea4.png\" alt=\"\" data-id=\"2314\" data-link=\"https:\/\/www.knownhost.com\/kb\/?attachment_id=2314\"\/><\/div><\/div>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"command_line_usage\"><span class=\"ez-toc-section\" id=\"command_line_usage\"><\/span>Command Line Usage<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p><em>CustomBuild<\/em><\/p>\n\n\n\n<p>DirectAdmin facilitates CustomBuild usage and configuration via the&nbsp;<em>build<\/em>&nbsp;command.<\/p>\n\n\n\n<p>There is so much that can be done with this command. To view all options, you could just run the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  \/usr\/local\/directadmin\/custombuild\/build<\/code><\/pre>\n\n\n\n<p>The following will show you your current configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  \/usr\/local\/directadmin\/custombuild\/build used_configs<\/code><\/pre>\n\n\n\n<p>And the following will show you what the latest available version of a software is versus that you have installed:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  \/usr\/local\/directadmin\/custombuild\/build versions<\/code><\/pre>\n\n\n\n<p>Use the following to update those that require updates:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  \/usr\/local\/directadmin\/custombuild\/build update_versions<\/code><\/pre>\n\n\n\n<p>The following will show some of the more important options as set in the \/usr\/loca\/directadmin\/custombuild\/options.conf:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  \/usr\/local\/directadmin\/custombuild\/build options<\/code><\/pre>\n\n\n\n<p>The syntax is as follows for setting an option to a value:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  \/usr\/local\/directadmin\/custombuild\/build set option_name value<\/code><\/pre>\n\n\n\n<p>After setting the option as desired, you may need to issue commands to rebuild and rewrite configuration files. For example, the following set of commands would set the primary default PHP version to 7.3 and then update, rebuild, and rewrite the configuration files:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  cd \/usr\/local\/directadmin\/custombuild\n  .\/build set php1_release 7.3\n  .\/build update\n  .\/build php n\n  .\/build rewrite_confs<\/code><\/pre>\n\n\n\n<p><em>cPanel<\/em><\/p>\n\n\n\n<p>EasyApache4 uses yum for installing modules from the EA4 repository. This means that you can also use&nbsp;<em>rpm<\/em>&nbsp;to review installed modules. One could use the following to view all installed PHP 7.3 modules:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  rpm -qa | grep ea-php73-php<\/code><\/pre>\n\n\n\n<p>And as for&nbsp;<em>yum<\/em>, the following can be used to install the XML PHP extension:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  yum install ea-php70-php-xml -y<\/code><\/pre>\n\n\n\n<p>The following command is used to view and help manage the PHP Handlers for each PHP version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  \/usr\/local\/cpanel\/bin\/rebuild_phpconf <\/code><\/pre>\n\n\n\n<p>To view the current PHP handlers for each PHP version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  \/usr\/local\/cpanel\/bin\/rebuild_phpconf --current<\/code><\/pre>\n\n\n\n<p>To set the PHP handler to LSAPI for PHP version 7.2:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  \/usr\/local\/cpanel\/bin\/rebuild_phpconf --ea-php72=lsapi<\/code><\/pre>\n\n\n\n<p>It is important to remember that the .htaccess and .ini files must be rewritten if a PHP handler is changed. The WHMAPI can be used to reapply all PHP versions to all domains following a handler changes with a for loop like so:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  for d in $(awk -F: '{print $1}' \/etc\/userdomains | grep -v '*' | grep -Pv 'ns&#091;\\d]'); do v=$(grep -P \"^$d\" \/etc\/userdatadomains | grep -Po 'ea-php&#091;\\d]&#091;\\d]'); &#091;&#091; -z $v ]] &amp;&amp; v=$(grep def \/etc\/cpanel\/ea4\/php.conf | grep -Po 'ea-php&#091;\\d]&#091;\\d]'); whmapi1 php_set_vhost_versions version=$v vhost-0=$d; done<\/code><\/pre>\n\n\n\n<p>It is also important to ensure that the user&#8217;s PHP settings are consistent across these files. The&nbsp;<em>\/usr\/local\/bin\/ea_sync_user_phpini_settings<\/em>&nbsp;script syncs the php.ini , .user.ini, and .htaccess files for either a specified user:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  \/usr\/local\/bin\/ea_sync_user_phpini_settings --user=username<\/code><\/pre>\n\n\n\n<p>Or for all users:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  \/usr\/local\/bin\/ea_sync_user_phpini_settings --all-users<\/code><\/pre>\n\n\n\n<p>There are also many, many more WHM&nbsp;API&nbsp;commands that can be used to manage Apache and PHP from the CLI.&nbsp; See here: <a href=\"https:\/\/documentation.cpanel.net\/display\/DD\/WHM+API+1+Sections+-+PHP\">WHM API 1 Sections &#8211; PHP<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"customizations\"><span class=\"ez-toc-section\" id=\"customizations\"><\/span>Customizations<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"webserver\"><span class=\"ez-toc-section\" id=\"webserver\"><\/span>Webserver<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p><em>DirectAdmin<\/em><\/p>\n\n\n\n<p>When customizing your webserver configuration files, you must follow guidelines set forth by your chosen panel for doing so. If you do not, then your customizations will be overwritten the next time the panel rewrites these files. This is true for both DirectAdmin and cPanel.<\/p>\n\n\n\n<p>DirectAdmin allows you to make changes via customized template files so that your customizations are used anytime configuration file rewrites are done. This is actually true for any DirectAdmin server services that use a template-based configuration, such as Named.<\/p>\n\n\n\n<p>For example, to change the docroot for all subdomains, you would rewrite a custom virtualhost template specifying this customization.&nbsp;<br><br>Question: <a href=\"https:\/\/help.directadmin.com\/item.php?id=199\">How do I change the DocumentRoot of only one of my subdomains?<\/a><br>Answer:&nbsp;<a href=\"https:\/\/help.directadmin.com\/item.php?id=2\">Using a custom VirtualHost template<\/a><\/p>\n\n\n\n<p>If you want to instead modify the httpd.conf, you would either edit the designated customizations file \/etc\/httpd\/conf\/extra\/httpd-includes.conf, or create a custom httpd.conf in the CustomBuild custom\/ directory.&nbsp;<a href=\"https:\/\/help.directadmin.com\/item.php?id=351\">Custom httpd.conf<\/a>. Such changes requiring this would include adding custom modules. Also, editing configuration settings, such as MaxClients or ServerLimit is done similarly. To accomplish this, locate the value you need to change like so:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  grep -Rli 'serverlimit\\|maxclients' \/etc\/httpd\/conf\/<\/code><\/pre>\n\n\n\n<p>Once you&#8217;ve found the file containing the value to edit, copy it into the CustomBuild custom\/ directory and make the desired changes. This way, CustomBuild will recognize that you&#8217;ve customized your configuration and not overwrite the file containing those customizations. You must remember this change if you decide to change your configuration in the future, though.<\/p>\n\n\n\n<p>If you need to make a customization to only one domain&#8217;s virtualhost, you would do so via Admin Level \u2192 Custom Httpd configurations \u2192 domain.com, which creates a custom httpd configuration file in the user&#8217;s data directory, \/usr\/local\/directadmin\/data\/users\/USER\/domains\/DOMAIN.TLD.cust_httpd<\/p>\n\n\n\n<p>To summarize, if you need a change that will be applied to the httpd configuration, use the CB custom\/ directory or use the \/etc\/httpd\/conf\/extra\/httpd-includes.conf file if you are adding code rather than removing or altering existing code. If you need a change applied to all Vhosts for all or some domains (such as the webmail or stats subdomains by default) you&#8217;d use the custom virtualhost template.&nbsp;<a href=\"https:\/\/help.directadmin.com\/item.php?id=92\">Setting up webmail.domain.com as default for new domains<\/a>&nbsp;If you need a change for a single domain&#8217;s vhost, use the Custom Httpd configurations interface for that domain.<\/p>\n\n\n\n<p><em>cPanel<\/em><\/p>\n\n\n\n<p>cPanel makes use of include files for making changes to specific domains. You must create the specified path to the include file and the file itself containing the customizations and rebuild and restart Apache in order for a domain&#8217;s custom changes to be included. The main configuration file specifies these include file paths\/names.&nbsp;<a href=\"https:\/\/documentation.cpanel.net\/display\/EA\/Advanced+Apache+Configuration#AdvancedApacheConfiguration-Modifythecontentofspecificvirtualhosts\">Modify the content of specific virtualhosts<\/a>&nbsp;Creating the path and the file must be done via CLI.<\/p>\n\n\n\n<p>cPanel also allows one to change the templates as well, which will change how cPanel writes the virtualhosts in the first place.&nbsp;<a href=\"https:\/\/documentation.cpanel.net\/display\/EA\/Advanced+Apache+Configuration#AdvancedApacheConfiguration-ChangehowcPanel&amp;WHMwritesvirtualhosts\">Modify the content of specific virtualhosts<\/a>&nbsp;You would use this method if you needed a custom subdomain created by default for all domains, for example.<\/p>\n\n\n\n<p>You can also use WHM to edit the global httpd configuration. Use this method to edit global variables, such as Server Limit, for example.&nbsp;<\/p>\n\n\n\n<p>To summarize, cPanel offers the same techniques to customize the webserver configuration as DirectAdmin for the most part. One would use a customized global template to modify the Virtual Host created by the panel for all domains, the domain&#8217;s include files (found in the user&#8217;s data in DA) to edit the configuration for a single domain, and lastly, the global include files for editing the global httpd configuration.<\/p>\n\n\n\n<p>The only major difference that I see between the two is that DirectAdmin allows one to <a href=\"https:\/\/help.directadmin.com\/item.php?id=191\">make changes to the custombuild files for Apache<\/a>&nbsp;to change what components it is built from source with. This difference exists because the configuration is built from source rather than from RPMs as is the case with cPanel.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"php\"><span class=\"ez-toc-section\" id=\"php\"><\/span>PHP<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>PHP customization&#8217;s in DirectAdmin can be accomplished in many, many different ways, and the files that you would edit depend on what type of webserver and PHP handler you are using. It is actually quite confusing to navigate this, though that is the price you pay for having a highly customizable environment. There is no single panel-specified method, so unexpected results can occur when multiple files are edited with different or conflicting settings, especially when a server is managed by a team rather than a single person. Overall, the single method that appears to offer the most flexibility and will likely work regardless of your configuration involves creating a uniquely named custom php.ini file within the directory \/usr\/local\/lib\/phpXX\/php.conf.d\/.&nbsp;<a href=\"https:\/\/help.directadmin.com\/item.php?id=622\">I want per-domain or per-path settings for php<\/a>. You can then proceed to specify a PATH or HOST section to apply the custom php directives to a certain path or domain, respectively.<\/p>\n\n\n\n<p>cPanel, on the other hand, has explicit instructions for PHP customizations. WHM contains the MultiPHP Manger and the MutliPHP INI Editor. The MultiPHP INI Editor in WHM is used to apply global php.ini settings, either via a php.ini or a php-fpm.conf (but both are editable via the MultiPHP INI Editor interface). Within cPanel, a MultiPHP INI Editor also exists, which can be used to make edits on a per domain basis. One nice feature of cPanel&#8217;s setup is that their MultiPHP INI Editors will create and correctly edit:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>a custom php.ini<\/li>\n\n\n\n<li>a custom .user.ini<\/li>\n\n\n\n<li>an .htaccess<\/li>\n<\/ol>\n\n\n\n<p>They do this all within the same directory for the changes and keep these 3 files synced. This is really very helpful as it keeps one from having to analyze their PHP, PHP Handler, and Webserver configuration thoroughly before adjusting php settings. It also prevents conflicting changes in different locations that could result in one very frustrated site\/system admin.<\/p>\n\n\n\n<p>For information on PHP Handlers and their differences check out: <a href=\"https:\/\/www.knownhost.com\/kb\/php-handlers-and-what-they-are\/\">PHP Handlers and what they are.<\/a><br><br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>While a lot of information to take in, you can see that the differences between <a href=\"https:\/\/www.knownhost.com\/directadmin\">DirectAdmin<\/a> and <a href=\"https:\/\/www.knownhost.com\/cpanel\">cPanel<\/a> are few and in between. Both provide decent webserver and PHP coverage to allow any websites that you were running on cPanel to run on DirectAdmin and vice versa. There should be little to any issue caused should you have swapped to a different control panel.<\/p>\n\n\n\n<p><meta http-equiv=\"content-type\" content=\"text\/html; charset=utf-8\">KnownHost offers 365 days a year, 24 hours a day, all 7 days of the week best in class technical support. A dedicated team is ready to help you should you need our assistance. You\u2019re not using KnownHost for the best web hosting experience? Well, why not? Check with&nbsp;our Sales team&nbsp;to see what can KnownHost do for you in improving your <a href=\"https:\/\/www.knownhost.com\/web-hosting\"><strong>web hosting<\/strong><\/a> experience.<\/p>\n\n\n<div class=\"kb-shortcode kb-shortcode_info\">\n                    <div class=\"kb-shortcode-icon\">\n                        <i class=\"fa fa-info-circle fa-2x\"><\/i>\n                    <\/div>\n                    <div class=\"kb-shortcode-content_info\">Course Navigation<\/p>\n<p><a href=\"https:\/\/www.knownhost.com\/kb\/cpanel-and-directadmin-sql-dns-email-backups-the-rest\/\">Next Article &gt;&gt;<\/a><\/div>\n                <\/div>\n","protected":false},"excerpt":{"rendered":"<p>cPanel and Directadmin both offer methods of implementing PHP and Webserver changes, modules and\/or configurations. We&#8217;ll go into each respective methods of handling this and how they go about it while providing relevant information that you may or may not find as useful as we did. \ud83d\ude42 The Webserver and PHP Implementation Because the PHP [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[93],"tags":[177,109,143,128,123,125],"class_list":["post-2309","post","type-post","status-publish","format-standard","hentry","category-courses","tag-cloud","tag-cpanel","tag-dedicated","tag-directadmin","tag-linux","tag-vps"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>cPanel and DirectAdmin: Webservers &amp; PHP - KnownHost<\/title>\n<meta name=\"description\" content=\"Get more information on the difference between cPanel and DirectAdmin and how to choose best option for your webservers needs.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"cPanel and DirectAdmin: Webservers &amp; PHP - KnownHost\" \/>\n<meta property=\"og:description\" content=\"Get more information on the difference between cPanel and DirectAdmin and how to choose best option for your webservers needs.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/\" \/>\n<meta property=\"og:site_name\" content=\"KnownHost\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-16T15:46:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-13T14:51:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/08\/custombuildgui-editoptions-php.png\" \/>\n<meta name=\"author\" content=\"Jonathan K. W.\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jonathan K. W.\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/cpanel-directadmin-webservers-php\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/cpanel-directadmin-webservers-php\\\/\"},\"author\":{\"name\":\"Jonathan K. W.\",\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/3db6e20d1f33519cd68fe0ba1230a48b\"},\"headline\":\"cPanel and DirectAdmin: Webservers &#038; PHP\",\"datePublished\":\"2021-08-16T15:46:16+00:00\",\"dateModified\":\"2026-05-13T14:51:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/cpanel-directadmin-webservers-php\\\/\"},\"wordCount\":1940,\"image\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/cpanel-directadmin-webservers-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/custombuildgui-editoptions-php.png\",\"keywords\":[\"cloud\",\"cpanel\",\"dedicated\",\"directadmin\",\"linux\",\"vps\"],\"articleSection\":[\"Courses\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/cpanel-directadmin-webservers-php\\\/\",\"url\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/cpanel-directadmin-webservers-php\\\/\",\"name\":\"cPanel and DirectAdmin: Webservers & PHP - KnownHost\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/cpanel-directadmin-webservers-php\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/cpanel-directadmin-webservers-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/custombuildgui-editoptions-php.png\",\"datePublished\":\"2021-08-16T15:46:16+00:00\",\"dateModified\":\"2026-05-13T14:51:29+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/3db6e20d1f33519cd68fe0ba1230a48b\"},\"description\":\"Get more information on the difference between cPanel and DirectAdmin and how to choose best option for your webservers needs.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/cpanel-directadmin-webservers-php\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/cpanel-directadmin-webservers-php\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/cpanel-directadmin-webservers-php\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/custombuildgui-editoptions-php.png\",\"contentUrl\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/custombuildgui-editoptions-php.png\",\"width\":1200,\"height\":1113,\"caption\":\"webservers directadmin\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/cpanel-directadmin-webservers-php\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"cPanel and DirectAdmin: Webservers &#038; PHP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/\",\"name\":\"KnownHost\",\"description\":\"KnownHost provides a comprehensive webhosting knowledge base to help answer many of your common webhosting and linux questions.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/3db6e20d1f33519cd68fe0ba1230a48b\",\"name\":\"Jonathan K. W.\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f432b99e6651fe8d1deb57a285bd84e806f1c9ae8b4c6c585d7e3a0b33789ad9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f432b99e6651fe8d1deb57a285bd84e806f1c9ae8b4c6c585d7e3a0b33789ad9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f432b99e6651fe8d1deb57a285bd84e806f1c9ae8b4c6c585d7e3a0b33789ad9?s=96&d=mm&r=g\",\"caption\":\"Jonathan K. W.\"},\"sameAs\":[\"https:\\\/\\\/www.knownhost.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"cPanel and DirectAdmin: Webservers & PHP - KnownHost","description":"Get more information on the difference between cPanel and DirectAdmin and how to choose best option for your webservers needs.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/","og_locale":"en_US","og_type":"article","og_title":"cPanel and DirectAdmin: Webservers & PHP - KnownHost","og_description":"Get more information on the difference between cPanel and DirectAdmin and how to choose best option for your webservers needs.","og_url":"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/","og_site_name":"KnownHost","article_published_time":"2021-08-16T15:46:16+00:00","article_modified_time":"2026-05-13T14:51:29+00:00","og_image":[{"url":"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/08\/custombuildgui-editoptions-php.png","type":"","width":"","height":""}],"author":"Jonathan K. W.","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Jonathan K. W.","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/#article","isPartOf":{"@id":"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/"},"author":{"name":"Jonathan K. W.","@id":"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/3db6e20d1f33519cd68fe0ba1230a48b"},"headline":"cPanel and DirectAdmin: Webservers &#038; PHP","datePublished":"2021-08-16T15:46:16+00:00","dateModified":"2026-05-13T14:51:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/"},"wordCount":1940,"image":{"@id":"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/08\/custombuildgui-editoptions-php.png","keywords":["cloud","cpanel","dedicated","directadmin","linux","vps"],"articleSection":["Courses"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/","url":"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/","name":"cPanel and DirectAdmin: Webservers & PHP - KnownHost","isPartOf":{"@id":"https:\/\/www.knownhost.com\/kb\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/#primaryimage"},"image":{"@id":"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/08\/custombuildgui-editoptions-php.png","datePublished":"2021-08-16T15:46:16+00:00","dateModified":"2026-05-13T14:51:29+00:00","author":{"@id":"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/3db6e20d1f33519cd68fe0ba1230a48b"},"description":"Get more information on the difference between cPanel and DirectAdmin and how to choose best option for your webservers needs.","breadcrumb":{"@id":"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/#primaryimage","url":"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/08\/custombuildgui-editoptions-php.png","contentUrl":"https:\/\/www.knownhost.com\/kb\/wp-content\/uploads\/2021\/08\/custombuildgui-editoptions-php.png","width":1200,"height":1113,"caption":"webservers directadmin"},{"@type":"BreadcrumbList","@id":"https:\/\/www.knownhost.com\/kb\/cpanel-directadmin-webservers-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.knownhost.com\/kb\/"},{"@type":"ListItem","position":2,"name":"cPanel and DirectAdmin: Webservers &#038; PHP"}]},{"@type":"WebSite","@id":"https:\/\/www.knownhost.com\/kb\/#website","url":"https:\/\/www.knownhost.com\/kb\/","name":"KnownHost","description":"KnownHost provides a comprehensive webhosting knowledge base to help answer many of your common webhosting and linux questions.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.knownhost.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/3db6e20d1f33519cd68fe0ba1230a48b","name":"Jonathan K. W.","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f432b99e6651fe8d1deb57a285bd84e806f1c9ae8b4c6c585d7e3a0b33789ad9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f432b99e6651fe8d1deb57a285bd84e806f1c9ae8b4c6c585d7e3a0b33789ad9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f432b99e6651fe8d1deb57a285bd84e806f1c9ae8b4c6c585d7e3a0b33789ad9?s=96&d=mm&r=g","caption":"Jonathan K. W."},"sameAs":["https:\/\/www.knownhost.com"]}]}},"_links":{"self":[{"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/posts\/2309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/comments?post=2309"}],"version-history":[{"count":3,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/posts\/2309\/revisions"}],"predecessor-version":[{"id":8144,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/posts\/2309\/revisions\/8144"}],"wp:attachment":[{"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/media?parent=2309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/categories?post=2309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/tags?post=2309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}