Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to Configure CustomBuild in DirectAdmin for Apache Methods

This guide needs admin and root access, so it fits VPS and dedicated server owners. It explains the ways PHP can run under Apache and how to pick one in CustomBuild.

DirectAdmin2 min read15 steps

What are these terms?

Apache is a web server. A web server is the program that hands your pages to visitors. CustomBuild is DirectAdmin's tool for installing and changing server software.

A PHP handler, or method, is the way Apache runs PHP code. Each method trades speed, safety and memory in a different way. Common ones are:

  • mod_php runs PHP inside Apache. It is fast but all sites share one user.
  • suPHP runs each site as its own user. It is safer but slower.
  • PHP-FPM runs PHP as a separate service. It is fast and keeps users apart. Most servers choose it today.
  • FastCGI is an older method that is similar to PHP-FPM.

Exact names depend on your CustomBuild version.

Before you start

Changing the method restarts Apache and rebuilds PHP. Sites may be slow or down for a few minutes. Take a snapshot or backup first. Also check that your sites do not depend on a specific method.

Steps in the panel

  1. Log in to DirectAdmin as admin.
  2. Open CustomBuild. Look under Server Manager or the admin menu.
  3. Find the Web Server setting. Make sure Apache is selected.
  4. Find the PHP mode setting. It has a name like PHP 1 Mode. Each PHP version has its own mode.
  5. Pick the method you want, for example php-fpm.
  6. Click Save.
  7. Click the button to rebuild PHP, then the button to rebuild Apache if the page asks for it.
  8. Wait until the log says it has finished.

Steps over SSH

SSH is a safe way to type commands on a server from far away.

  1. Connect as root.
  2. Go to the CustomBuild folder:
cd /usr/local/directadmin/custombuild

This moves you to the CustomBuild folder.

  1. Open the options file with a text editor and set your values, such as php1_mode=php-fpm.
  2. Rebuild PHP and Apache:
./build set php1_mode php-fpm
./build php n
./build apache

The first line saves the setting. The next two rebuild PHP and Apache.

After the change

  1. Open a few sites and check that they load.
  2. Test a form or a login page.
  3. If something breaks, set the old method again and rebuild.
Tip: Ask Hostvento support which method suits your server before you change a live one.

Quick recap

  • A PHP method decides how Apache runs PHP.
  • PHP-FPM is a common, safe, fast choice.
  • Set the mode in CustomBuild, then rebuild.
  • Take a snapshot first.
  • Test your sites after the rebuild.