≡ Menu

Apache, PHP and MySQL Optimization

For Dedicated Server or VPS users, Apache, PHP and MySQL Optimization is very important, because with a little optimization will reduce the burden on our resources of dedicated or VPS put through the process, especially if our server has a limited hardware resources.

Here I will attach some optimizations for Apache web server is one that is fast, reliable and flexible. But it is by default, Apache can take a lot of resources. In it I also convey to the optimization of PHP and MySQL so our servers will be faster and save server resources used.

Turn off Apache and MySQL service:

PHP Optimization

Remove remark or comment in the file /usr/local/etc/php.ini, so that the contents of a file like the following:

Prepare the PHP error log file:

Apache Optimization

Remove modules that are not needed and the remark or comment in the file /usr/local/etc/apache22/httpd.conf. Thus becomes:

Edit MPM worker file ini /usr/local/etc/apache22/extra/httpd-mpm.conf :

Edit Virtual Host at file /usr/local/etc/apache22/extra/httpd-vhost.conf :

Edit the default configuration file /usr/local/etc/apache22/extra/httpd-default.conf :

Enable mod_deflate by creating a file /usr/local/etc/apache22/Includes/mod_deflate.conf contains:

Check the Apache configuration:

MySQL Optimazitaion

The contents of the file /var/db/mysql/my.cnf:

Run all the services by typing:

Hopefully the discussion Apache, php and mysql optimization can be a reference for all of us in the optimization of our server

{ 0 comments… add one }

Leave a Comment


This site uses Akismet to reduce spam. Learn how your comment data is processed.