In this tutorial I will show you how to optimize memory in Kloxo.
- First take care of MySQL:
You need to SSH to your VPS at first.
Now if you don’t already have “nano” you can install it like this:
now that you have nano, you should make a copy of the file we’re modifying [in case something goes wrong], with this line:
cp /etc/my.cnf /etc/my.cnf.old
Now you can modify the file using nano simply like this:
Now you can edit your file, as if you are in a GUI text editor.
find [mysqld] which is at the beginning and right after that insert:
That’s it! Press Ctrl+X and then Press Y and then Enter.
Now you have to restart mysql:
Check your RAM Memory usage now and no problem, you are welcome!
|MySQL, a Data Base Management System|
Lighttpd is way faster than Apache and consumes less RAM. It’s highly recommended. However it’ll mess up your .htaccess a bit. You can find solution for that too, of course.
I have installed Lighttpd in SSH first and then switched from apache to lighttpd in Kloxo Panel. But I guess it’s still fine if you switch it in Kloxo in the first place without installing it via SSH. Kloxo will install Lighttpd, itself.
Here’s the line you should use to install lighttpd in SSH :
Now, in order to swtich programs in Kloxo, login to your Kloxo Admin Page, Find “Server: linux” box and click on “Switch Program”.
Simply under the “Web” choose lighttpd insted of apache and click on Update. [Don’t close it yet, you need to do one other thing]
|Apache vs. Lighttpd Completion Time|
- In the same page that you changed your Web program from apache to lighttpd, change your Dns program from bind to djbdns.
You are done! Check out your RAM Memory usage.
Now if you host any WordPress blogs on your server, in order to make all the links work properly do this [Lighttpd + WordPress = 404 Not Found Error]:
in /wp-content/themes/[name of your theme]/404.php you should add this code right in the beginning:
<?php header("HTTP/1.1 404 Not Found"); ?>
Now there’s one other file you’re going to have to modify and that is/etc/lighttpd/lighttpd.conf:
#server.error-handler-404 = "/error-handler.php"
Change it to:
server.error-handler-404 = "/index.php"
All you have to do now is to restart lighttpd: