There are certain situations when you can encounter such cPanel update error message.
In order to update cPanel has to download new files and packages to replace outdated. For this it requires about 1.8Gb of free space on /usr partition. What can you do to fix the problem if you get this error message ?
Read more »
Category Archives: code - Page 2
Centos: How to fix cPanel update insufficient disk space
Wordpress: how to trim your wp_options table
In my line of work I am exposed to various Wordpress installations – different plug-in sets, different themes, various amount of content – so, I have my fair share of troubleshooting Wordpress performance issues related to almost anything.
Read more »
Sysadmin: correcting file permissions recursively from the shell
In a way of troubleshooting web application there is the step when all known reasons why it doesn’t work exhausted so they just change permissions on everything to 0777 and hope that this drastic step would fix the problem. Most likely it does not but leaves the permissions broken and and the whole site wide open.
Usually nobody cares until first break-in, then everybody start looking for the responsible parties, and host is first and most likely last to blame.
In order to avoid this problem permissions (and possibly ownership) of the web content should be corrected.
Read more »
Centos: Quick’n’easy howto install node.js
Unfortunately I could not find proper node.js RPM available, so I had to resort to building it from source. Completely against RH ideology but what else you can do?
Read more »
sysadmin: LVM expand volume by adding disk
Problem: You have LVM logical volume configured to hold a lot of data but at some point you ran out of space – you want to expand the logical volume space by adding more disks to the system.
Read more »
Sysadmin : remove all virtualmin domains in one shot
If you need to clean up the hosting server and clean install is not an option and you know that all domains on servers were created with virtualmin you can remove all virtualmin domains in one shot using command line API:
virtualmin list-domains --name-only | xargs -n1 virtualmin delete-domain --domain
Wait a while and you are done. There are tons of useful options for command line virtualmin that you might want to explore if you are using virtualmin for your hosting domain management.
X-Robots-Tag in headers – fine grained crawlers control in apache
I was asked to implement X-Robots-tag on one of our dedicated servers the other day.
This google document explains in the great details what it does and how it influences your site presentation on the search engine.
Read more »
Django on cpanel server for shared web hosting
I had a customer request to install Django on cpanel server shared account the other day – took me some time to get it going, mostly because of easyapache not willing to play nice.
Other then that, Jimmy’s blog entry here provides excellent instructions on how to configure it, the only difference being that his cpanel server already had mod_fcgid installed.
So, what I’ll do is just quick recap:
Things to do as root
- Make sure your apache had mod_fcgid compiled, if not – run easyapache script from SSH or from WHM web page and make sure mod_fcgid option checked
- Install easy_install script –
123456#cd /usr/src/#wget http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c11-py2.4.egg#sh setuptools-0.6c11-py2.4.egg - Use easy_install to install a couple Python packages –
123456#cd /usr/src#./easy_install flup#./easy_install django - Restart apache, make sure mod_fcgid is loaded
This is it – you can notify customer that he can do his django magic – all prerequisites are in place.
Apache, PHP, SuEXEC: added security and control
As we know from original article using Apache, PHP in CGI mode along with suExec gives us 2 important security advantages:
– suExec allows to run PHP process with (only) the file owner user privileges, enforcing proper permissions on PHP scripts and thus allowing to avoid cross-site exploits on the server that is running multiple dynamic web sites;
– per site php.ini.
That gives some unique opportunities for securing separate web sites on the server.
Read more »
Apache, PHP, SuEXEC: when it just wouldn’t work out.
Looks like I will have a lot to say on this topic still. By now I’ve collected some cases when you can not use PHP in FastCGI mode and to keep the sites running you will need to abandon suEXEC nice and clean privilege separation mechanism in favor of mod_php/ASAPI.
Read more »