Tuesday, September 30, 2008

Add SPF record by default for all new accounts domain

If anyone want to add SPF record by default to newly created account on cPanel server then follow the steps one by one to enable the SPF record.

1. Login to WHM using root
2. Click on Edit "Zone Templates" and then on “standard”
3. Add at the end of the "Zone Templates" file:

%domain%. IN TXT “v=spf1 a mx -all”

You can replace “v=spf1 a mx -all” with the syntax which you want set for your domains
.
4. Repeat step no 2 and 3 respectively for the “simple” zone template.

Also refer following blog to collect more information http://theperfectarts.com/

Monday, September 22, 2008

Enable private PHP Error Logging by using .htaccess file

To hide the PHP errors from visitors insert the following code in .htaccess file

# Disable php errors
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off

Once disable the error logs for visitors enable the private PHP error logging by using following code in the .htaccess file

# enable PHP error logging
php_flag log_errors on
php_value error_log /home/path/public_html/domain/PHP_errors.log

The PHP_errors.log file needs to be permission 755 or 777.

Also refer following blog to collect more information http://theperfectarts.com/

Thursday, August 28, 2008

Secure Joomla site.

To avoid Joomla site to be hacked follow the following steps.

Disable RG_EMULATION for Joomla. When this option is enabled even the latest Joomla is

vulnerable to some variable injections. It can be disabled by placing the following line in

your configuration.php:

if(!defined('RG_EMULATION')) { define( 'RG_EMULATION', 0 ); }

-------------
Secure your administrator's area. This will first prevent simple brute-force attacks. Along

with that, all components and modules' code inside this directory will be safe. For this

purpose:

- Place an .htaccess inside Joomla's 'administrator' directory. It should contain:

Deny from all
Allow from YourIP*

In case your IP changes, you should try securing the directory with Password Protection

If you are using PHP 5.2, make sure that the directive 'allow_url_include' is set to off;

If you are using PHP version below 5.2, make sure that the directive 'allow_url_fopen' is

set to off.

Also refer following blog to collect more information http://theperfectarts.com/

Wednesday, August 27, 2008

Enable private PHP Error Logging via .htaccess\disable PHP Error Logging for visitor

To hide PHP errors from visitors insert the following code in .htaccess

# supress php errors
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off

Once disable the error logs for visitors enable the private PHP error logging by using following code in .htaccess

# enable PHP error logging
php_flag log_errors on
php_value error_log /home/path/public_html/domain/PHP_errors.log

The PHP_errors.log file needs to be permission 755 or 777.

Also refer following blog to collect more information http://theperfectarts.com/

Connect and publish files by using Frontpage

Following are the steps to connect the Frontpage and publish the sites files/folders.

1.Begin by starting Microsoft FrontPage Explorer from your Windows Start Menu.

2.Select Open Web… from the File… menu. This will open the Open Web dialogue.

3.In the Open Web dialogue, select the My Network Places icon.

4.Now, enter http://www.yourdomainname.com into the Web Name field. Click Open to continue.

5.You will now be presented with a pop-up window entitled Enter Network Password.Enter your cPanel or FTP Username and Password without any space. Click OK to continue.

6.FrontPage Explorer will open a Folder List window at the left-hand edge of the Explorer screen that will contain the entire directory structure for your webspace.


7.To edit pages using FrontPage, double-click any of the web pages listed in the Folder List. A new FrontPage window will open for each page you select.

8. To upload newly-modified pages to the web, select File… then save… from the FrontPage Explorer tool bar. Your web pages will automatically reflect your latest changes.

Also refer following blog to collect more information http://theperfectarts.com/

Monday, August 25, 2008

Install mod proxy

First login into your server with the root login details

cd /home/cpapachebuild/buildapache/apache_1.3.31/src/modules/proxy/

or

cd /home/cpeasyapache/src/httpd-2.0.63/modules/proxy

Then run command:

/usr/local/apache/bin/apxs -i -c *.c

Add the following module to the httpd.conf to load proxy module with the httpd configuration file:

LoadModule proxy_module libexec/mod_proxy.so

And then restart the Apache service:
service httpd restart
or
/etc/init.d/httpd restart

You can check proxy installed or not on your server by using following command.

/usr/local/apache/bin/httpd -l | grep proxy

Also refer following blog to collect more information http://theperfectarts.com/