VPS Quirks
Details about specific problems and quirks can be found listed here, including known bugs in packages and other details that might help you manage your VPS account.
Installing ImageMagick on a centos vps
Unfortunately installing imagemagick can cause some issues
If you get the message "Error: Missing Dependency: udev >= 089-1 is needed by package hal"
DO NOT INSTALL UDEV, udev is known to cause problems with deleting entries in /dev, instead you can install from source
yum install make
wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.4.0-9.tar.gz
tar xvfz ImageMagick-6.4.0-9.tar.gz
cd ImageMagick-6.4.0-9/
./configure && make && make install
Run away memory issues on Kloxo template
This clamd.conf issue should now be resolved in all Kloxo templates
If you have issues with your VPS "stalling" and using all the memory or showing now memory available, reboot your VPS and change the following line in /etc/clamd.conf then restart the VPS again. This will keep things from getting out of hand.
offending line in clamd.conf
> # Don't fork into background. > # Default: no > Foreground yes
If it is "yes" change it to "no"
The other issue that can occur is related to php. When you create a new domain in Kloxo you can limit the number of fastcgi processes. By default it is set to unlimited. It is recommended you create a resource plan that limits the number of fastcgi processes based on the type of VPS purchased.
If these solutions do not resolve your memory issues it is likely that your application is using all resources and you may want to consider upgrading your VPS package.
Ubuntu Image will not start apache2
After installing the Ubuntu image in the value vps you may want to install apache2, however it may not start, if it doesn't check /var/log/apache2/error.log
If you see apr_thread_create: unable to create worker thread
add the following to /etc/apache/httpd.conf
ThreadStackSize 1000000
Then restart Apache
/etc/init.d/apache2 restart
This limits the size of threads to 1Mb and creates a much less memory intensive Apache.
Ubuntu - Apache 2 and MySQL using to many resources
The default Ubuntu installs of Apache and MySQL use up a bit too much memory if you have limited resources to work with. All the steps here are from the following:
http://chrisjohnston.org/2008/configuring-a-lightweight-apache-mysql-install-on-debian-ubuntu
First enter: $top
Look for the MySQL command. (If you don’t see it, press <Shift> + M to sort by the amount of memory used) Once you locate MySQL, make note of the percentage of memory it is using. Now exit top by hitting ‘q’.
We are now going to edit your MySQL configuration. First you want to make a backup by entering:
$sudo cp /etc/mysql/my.cnf /etc/mysql/my.cnf.orig
Now open my.cnf using your preferred editor. We will use nano for this tutorial.
$sudo nano /etc/mysql/my.cnf
Find the following line in your my.cnf file:
#skip-innodb
Uncomment that line. (Note: if after changing this line your database no longer works, come back and comment this line out again and restart MySQL.)
Next locate the line: skip-external-locking
and add:
skip-locking
below it. Next find the section labeled Fine Tuning. Change the settings in that section to match:
key_buffer = 16K max_allowed_packet = 1M thread_stack = 64K thread_cache_size = 4 sort_buffer = 64K net_buffer_length = 2K #max_connections = 100 #table_cache = 64 #thread_concurrency = 10
Now restart MySQL: $sudo /etc/init.d/mysql restart
Now run ‘top’ again, and see what your percentage of memory is. If all is right, it should be much lower. Now we will change the apache configuration. This will not show you a lower memory usage per se, however, it should prevent apache from using too much memory. First lets make a backup of your apache config.
$sudo cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf.orig
Now lets open the apache config file for editing: $sudo nano /etc/apache2/apache2.conf
Now make your entries match the following:
Timeout 45
KeepAlive On
MaxKeepAliveRequests 200
KeepAliveTimeout 3
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 30
MaxRequestsPerChild 2000
</IfModule>
Finally restart apache: $sudo /etc/init.d/apache2 restart
If you have problems with memory still, try lowering your “MaxClients” to 25.
Kloxo SSL
To install a crt in Kloxo, you must first remove the password
Map a Domain to an IP before switching your DNS
Under some circumstances, the 'DNSLess View' may not offer full functionality for testing applications. The solution would be to map a domain to one of your VPS IP addresses. However, in order to map a domain, that domain must resolve to the IP! This creates a problem as you are probably trying to test your application BEFORE switching your DNS.
The work-around for this is to create an entry in /etc/hosts for your domain.
<ip address you wish to use> domain.tld
Now the server will think that domain.tld resolves to the IP you wish to map it to, and you can configure this successfully in LxAdmin.
Joomla rewrites with lighttpd
Please see the following forum post for assistance with Joomla/lighttpd rewrites (fancy urls):
PHP Config issue in Kloxo/LxAdmin
'PHP Config' under 'Web & Mail & DB' is suppose to be global setting for all your domains and sub-domains though as of now is doesn't seen to work though this may only be for some user. So you will have to set each one manually.
Here is the work-around steps:
1. Go to the 'Home' page of your Kloxo
2. Click the 'Domains' Tab at the top
3. Now under the 'Domain Name' part of the table click the domain/sub-domain link that you wish to change PHP config settings. ex. 'test.com' or 'subdomain.test.com'
4. Scroll down to the 'Script' section and click 'PHP Config'
5. Edit the settings you want for that domain or sub-domain then press 'Update'
(Now just use the drop down menu 'Switch To Another' to select another domain/sub-domain's PHP Configurations or repeat these steps 1-5 for all the domains and/or sub-domains)
Setting up a Catch-All address in Kloxo VPS
To setup up a catchall address in Kloxo:
1. Log into Kloxo
2. Click on the Domains tab
3. Click on the Domain your setting the catchall up on
4. Scroll Down to Mail:qmail
5. Click on the Configure Catchall icon
6. Choose the email address you want all the mail to go to
7. Click Update
Unfortunately due to a bug in Kloxo this will not complete the catchall setup. To complete the setup you will need to:
1. SSH into your VPS
2. Open the following file with your favorite command line editor (vi, emacs, etc):
/home/lxadmin/mail/domains/yourdomain/.qmail-default *where yourdomain is the domain your creating
the catchall.
For example:
/home/lxadmin/mail/domains/exampledomain.com/.qmail-default
3. There is one line in this file:
| /home/lxadmin/mail/bin/vdelivermail /home/lxadmin/mail/domains/usersdomain/postmaster
4. Change the postmaster to the email address you choose in Kloxo
| /home/lxadmin/mail/bin/vdelivermail /home/lxadmin/mail/domains/usersdomain/email-address-without-the-@domain
For example
| /home/lxadmin/mail/bin/vdelivermail /home/lxadmin/mail/domains/exampledomain.com/myemail
5. Now restart qmail
In Kloxo:
Home tab - Scroll down to Server:linux - Click Services - Click on the 3rd blue button (right next to the "Qmail Mail Server" description)
From SSH:
service qmail restart
You should now have a working Catch-all email address.
Repairing lighttpd To Restore Kloxo Access
It seems that there is a problem between lighttpd and openssl that is causing some problems and making Kloxo unavailable. This issue is almost always fixed by using yum to update lighttpd. If there are any problems running yum update it could be necessary to use 'yum erase sendmail' or 'yum erase qmail' depending on which MTA you are using. It looks like the current versions of lighttpd and openssl aren't compatible so lighttpd isn't starting correctly. Updating lighttpd should fix this issue and it's always good to stay current on all updates.
You should be able to run
yum update
from the command line to correct this issue and restore access to Kloxo. If that doesn't work and you follow the above suggestions to fix yum then let us know and provide us with any errors you receive and we'll take a look at it. Please note this issue is controlled by LXLabs and preventing it from happening is currently beyond our control.