Archive for May, 2008
Monday, May 26th, 2008
1. Document everything you do ; You or someone else would come accross the same issue sometime else and from my long experiance; if you dont document you probably would have to start over again!
2. Face the issue from the head and tackle it from the tail! . The best sysadmin practice would be [...]
Posted in Security, hosting | 1 Comment »
Sunday, May 25th, 2008
This bash script is very useful if you are planning to do cpanel account migrations purely from the commandline and automate the process of the migration . This scripts extracts the names of all reseller users in the server to the file
/opt/reseller_list
and correspondingly for all users in this list extract the cpanel usernames to the [...]
Tags: cpanel, hosting
Posted in cpanel, hosting | 3 Comments »
Thursday, May 22nd, 2008
A slight change in the setup and now i can see the user who is executing the scripts in my website
Before when apache intrepets a php script it calls fastcgi which inturn calls the php cgi binary.But still the php binary is executed as the calling user which in our case is the user [...]
Tags: Apache, php, Security
Posted in Apache, Security, hosting, php | No Comments »
Thursday, May 22nd, 2008
Today gnusys.net had a little downtime as i was trying to change my apache-php interface into FastCGI.
The installation of php-cgi and mod_fcgid went pretty simple in my Debian Etch;so was the configuration
The tricky part was that the wordpress blog was giving Internal Server Error in the index page.
====
[Thu May 22 04:15:41 2008] [notice] mod_fcgid: call [...]
Tags: Apache, php
Posted in Apache, hosting, php | No Comments »
Friday, May 16th, 2008
As everyone knows Apache is the most widely used web server and it has got a 75-25 usage rate when compared to Microsoft IIS. IIS was widely used before Apache and some of the major security flaws made people to rely on Apache which is upfront in terms of Security , flexibility and Reliability. I [...]
Tags: Apache, Security
Posted in Security | No Comments »
Thursday, May 15th, 2008
You can change the php memory_limit value for a particular domain or on a per virtual host basis by the following way
Add the following line to the file
/home/httpd/vhosts/gnusys.net/conf/vhost.conf
php_admin_value memory_limit “128M”
Reconfigure the vhost by running the following command
/usr/local/psa/admin/sbin/websrvmng –reconfigure-vhost –vhost-name=gnusys.net
and restart the webserver using the command
/usr/local/psa/admin/sbin/websrvmng –restart
Check if the setting is correct using phpinfo(); function
Tags: php, plesk
Posted in php, plesk | No Comments »
Thursday, May 15th, 2008
The following script retrieves the password of a mailname given the mail account name as input
This is version.2.0 of the same .The previous one i had written was very complex and created many files in /tmp which was useless.Version 2.0 is an elegant approach and will not create any stale files!
wget http://gnusys.net/downloads/psamailpass.bash
bash psamailpass.bash
Tags: plesk
Posted in hosting, plesk | 1 Comment »
Tuesday, May 13th, 2008
If you get the following error while managing a domain in parallels plesk control panel
=====
0: /usr/local/psa/admin/plib/dns/DNSZone.php:49
DNSZone->DNSZone(string ‘1′)
1: /usr/local/psa/admin/plib/common_func.php3:2875
objectMaker(string ‘DNSZone’, string ‘1′)
2: /usr/local/psa/admin/plib/dns/DNSManager.php:39
DNSManager::getDNSZone(string ‘1′)
3: /usr/local/psa/admin/plib/dns/DNSManager.php:75
DNSManager::getDefaultDNSZone()
4: /usr/local/psa/admin/plib/dns/DNSManager.php:104
DNSManager::syncDNSZoneAdminEmail(string ‘plesk@white.nl’, string ‘plesk2@white.nl’)
5: /usr/local/psa/admin/htdocs/server/admin_ed.php3:88
admin_ed(array, array, array)
6: /usr/local/psa/admin/htdocs/server/admin_ed.php3:171
====
chances are that you have manually removed some entry from the psa database
Please insert the following into the psa database dns_zone table
mysql -uadmin -p`cat [...]
Tags: mysql, plesk
Posted in plesk | No Comments »
Monday, May 12th, 2008
mysqlhotcopy is a perl script that can backup mysql databases using the MyISAM engines(InnoDb is not supported!) in a faster and efficient way
Following is a simple script to backup all your database to a directory (Preferably this directory should be in a hard drive different from your mysql databases so that there is no data [...]
Tags: mysql
Posted in mysql | No Comments »
Monday, May 12th, 2008
Xcache is a very good php cache that can accelerate php page deliveries .The following example uses xcache version 1.2.2.Please check the website http://xcache.lighttpd.net/ before you start the installation for the latest available release of this actively maintained software
neutron:~# wget http://xcache.lighttpd.net/pub/Releases/1.2.2/xcache-1.2.2.tar.gz
neutron:~# tar -xvzf xcache-1.2.2.tar.gz
neutron:~# cd xcache-1.2.2/
neutron:~/xcache-1.2.2# phpize
neutron:~/xcache-1.2.2# ./configure –enable-xcache –enable-xcache-optimizer
neutron:~/xcache-1.2.2# make
neutron:~/xcache-1.2.2# make install
neutron:~/xcache-1.2.2# cat xcache.ini [...]
Tags: php
Posted in php | No Comments »