Skip to Content

Monthly Archives: June 2012

To check if ssl is working fine on a site

Written on June 26, 2012 at 12:17 AM, by

To check if ssl is working fine on a site use the following php code on a test file and take it with https. If SSL is working fine, it will result, “You have initiated an SSL connection. You are secured”. <?php if($_SERVER[‘HTTPS’]){ echo ‘You have initiated an SSL connection. You are secured’; }else{ echo […]

Sample yum repo file

Written on June 25, 2012 at 8:35 PM, by

Here is the content for a new repo file that need to be installed in a linux server:   Name the repo file ” CentOS-Base.repo ” in the location /etc/yum.repos.d/   # CentOS-Base.repo # # This file uses a new mirrorlist system developed by Lance Davis for CentOS. # The mirror system uses the connecting […]

way to re- install spamassassin in server

Written on June 25, 2012 at 12:17 AM, by

There is a script to re install spam assassin the server. /scripts/perlinstaller –force Mail::Spamassassin if the above script is giving errors, do the following steps: export unset PERL5LIB unset PERL_LOCAL_LIB_ROOT rm /usr/bin/spamd rm /usr/bin/spamc /scripts/installspam –force /scripts/perlinstaller –force Mail::SpamAssassin

Way to enable Apache Mod_Substitute

Written on June 23, 2012 at 1:23 AM, by

Download apache source to /usr/src change directory to /usr/src/httpd-2.2.11/modules/filters/ and run the following command: /usr/local/apache/bin/apxs -cia mod_substitute.c   Now open httpd.conf and check the following line: LoadModule substitute_module modules/mod_substitute.so You need to the following lines also to httpd.conf for the working of this module. AddOutputFilterByType SUBSTITUTE text/html Restart apache. done.  

command to find the list of open files

Written on June 22, 2012 at 11:49 PM, by

  command to find all the deleted-but-still-open files and see which processes are holding them open: lsof +L1 Open files in a partition: lsof +L1 /usr

error: Horde Webmail “User xxx is not authorised for xxx”

Written on June 18, 2012 at 11:17 PM, by

Do the following steps in the server: cd /var/lib/mysql mysqldump horde > horde.sql mysqladmin drop horde /scripts/fullhordereset mysqlcheck -r -o horde   After that try logging into horde.  

enabling allow_url_include locally in cPanel

Written on June 15, 2012 at 11:44 PM, by

When using cPanel the way to enable allow_url_include directive locally (per user) is to create an Virtual Host include: First create an include file: /usr/local/apache/conf/userdata/std/2/username/domain.com/custom.conf Add directive to custom.conf: php_admin_flag allow_url_include On Then run to enable include: /scripts/ensure_vhost_includes –user=username –verbose Alternatively, enabling allow_url_include globally (server-wide) is done by editing /usr/local/lib/php.ini and adding “allow_url_include = On” […]

SymLinksIfOwnerMatch in apache conf

Written on June 13, 2012 at 4:20 PM, by

we  keep this option  “SymLinksIfOwnerMatch” in apache conf  to “On”, so that if a user creates symlink to his own files, apache will allow to access such files.  

Enable SSI using .htaccess in cpanel server

Written on June 13, 2012 at 1:51 AM, by

If you want to enable SSI [server side include] in cpanel server using .htaccess use the below rule, Options +Includes AddType text/html .shtm AddHandler server-parsed .shtml      

command to check zone file format

Written on June 12, 2012 at 11:07 PM, by

Use the following command with the corresponding zone db file :   named-checkzone website.org /var/named/website.org.db