I often get asked how to speed up a website. Here are 2 of the easiest and quickest ways to dramatically improve the performance of your website. I am assuming you have root access to either your VPS or CentOS installation. Let's begin:
Edit the file /etc/httpd/conf/httpd.conf
Close and save the httpd.conf file.
Now to go the root of your website and create a .htaccess file. The path to my website is /var/www/html/myawesomesite/public but yours could be different. Now edit your newly created .htaccess file and paste the following:
Close and save your .htaccess file.
Now we need to restart our apache web server for the changes to take effect with the following command:
service httpd restart graceful
All done! Now test to see if your performance has improved.