Back to Cloud Reseller Hosting

How To Optimize Apache - PHP Cloud

One of the big questions with a misbehaving Cloud account is how to increase performance or prevent out-of-memory errors.

Several different factors can tie into Apache/PHP performance for your Cloud account. Here are a few options that could help.

Apache Recompile

  • To conserve CPU recompile with Prefork MPM (memory usage will be higher). 
  • To conserver RAM or memory recompile with Worker MPM (CPU usage will be higher).
  • Recompile with only the modules that you need to run your websites.
  • Modify the PHP Handler from the default suphp to Fast CGI or fcgi.

You can recompile through WHM's EasyApache tool, or if you lack root access you can contact Support. 

Apache Adjustments

  • Many Clouds have low MaxClients but high MaxRequestsPerChild, so if you instead use higher MaxClients and lower children, that can sometimes help. That's modified via the Apache configuration, which you can access in WHM.
  • You can also reduce the timeout value or disable KeepAlive, which holds processes open for a bit when they are idle. That's also in the Apache configuration.
  • When using Allow or Deny directives, use IP addresses rather than a domain/hostname. 
  • You can also update a variety of settings either in the main php.ini file or with a local php.ini file in a user's web folder.

Related Articles

Can I FTP As Root To My Cloud Reseller Account
Can I Modify PHP Extensions
Custom DNS Information
How To Correctly Reboot - Shutdown
How To Disable Excessive Software - Services

Can’t Find what you need?

No worries, Our experts are here to help.