VPS – Apache & MySQL Performance Tuning

Apache

1. Open/Create /var/www/vhosts/{hostname}/conf/vhosts.conf

2. Add oradjust below code

3. Copy to make backup of apache configuration

4. Execute below shell script one by one

5. Create fake swap using following shell script

6. Copy and Paste below script to fakeswap.sh

 

MySQL

1. Backup current MySQL configuration

2. Add/Replace below configuration and adjust values (CAUTION: this is just example)

3. Download mysqltuner.pl

4. Execute mysqltuner.pl and follow suggestions

 

 

 

 

 

Reference:

https://kb.mediatemple.net/questions/246/Making+it+Better%3A+Basic+Apache+performance+tuning+%28httpd%29#dv

http://linux-problem-solver.blogspot.com.au/2013/08/create-fake-swap-in-openvz-vps-if-you-get-swapon-failed-operation-not-permitted-error.html

http://www.maxwhale.com/how-to-optimize-mysql-for-1gb-memory-vps/