Web Hosting Articles


Hello,
PHP and Apache are not being able to track which users are sending out mail through the PHP mail function from the nobody user causing leaks in formmail scripts and malicious users to spam from your server without you knowing who or where.

Monitiring exim_mainlog doesn’t exactly help, you see th email going out but you can’t track from which user or script is sending it. This is a quick and dirty way to get around the nobody spam problem on your Linux server.

If you check out your PHP.ini file you’ll notice that your mail program is set to: /usr/sbin/sendmail and 99.99% of PHP scripts will just use the built in mail(); function for PHP - so everything will go through /usr/sbin/sendmail
Requirements:

We assume you’re using Apache 1.3x, PHP 4.3x and Exim. This may work on other systems but we’re only tested it on a
Cpanel/WHM Red Hat Enterprise system.

Step 1:

Login to your server with root.

Step 2:
Turn off exim before proceeding
service exim stop

Step 3:
Take the Backup of  your original /usr/sbin/sendmail file

mv /usr/sbin/sendmail /usr/sbin/sendmail_bak

Step 4:

You need to  Create the spam monitoring script for the new sendmail.
pico /usr/sbin/sendmail

Paste in the following:

#!/usr/local/bin/perl

# use strict;
use Env;
my $date = `date`;
chomp $date;
open (INFO, “>>/var/log/spam_log”) || die “Failed to open file ::$!”;
my $uid = $>;
my @info = getpwuid($uid);
if($REMOTE_ADDR) {
print INFO “$date - $REMOTE_ADDR ran $SCRIPT_NAME at $SERVER_NAME n”;
}
else {

print INFO “$date - $PWD -  @infon”;

}
my $mailprog = ‘/usr/sbin/sendmail.hidden’;
foreach  (@ARGV) {
$arg=”$arg” . ” $_”;
}

open (MAIL,”|$mailprog $arg”) || die “cannot open $mailprog: $!n”;
while (<STDIN> ) {
print MAIL;
}
close (INFO);
close (MAIL);

save and close

Step 5:
Now change the new sendmail permissions
chmod a+x /usr/sbin/sendmail

Step 6:

Create a new log file to keep a history of all mail going out of the server using web scripts
touch /var/log/spam_log

chmod 0777 /var/log/spam_log

Step 7:
Start Exim up again.
/etc/init.d/exim start

Step 8:
You can Monitor your spam_log file for spam, try using any formmail or script that uses a mail function - a message board, a contact script.
tail - f /var/log/spam_log

Reference taken from : webhostgear.com

Hello,

ImageMagick is a software used  to create, edit, and compose bitmap images. Using ImageMagick we can read, convert and write images in a variety of formats including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. ImageMagick is used to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

ImageMagick is typically utilized from the command line or you can use the features from programs written in your favorite programming language. Choose from these interfaces: G2F (Ada), MagickCore (C), MagickWand (C)

How to install ImageMagick On Linux server:

wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz

tar -zxvf ImageMagick*.tar.gz
cd ImageMagick*

./configure

make

make install

You can verify the installation with command :

which convert

Regards,

Tuks

Hello,

For taking backup of you database you have to make sure that you database is good enough. with shell access you can take the database backup in .sql format with following command

#mysqldump user_databasename > database.sql

As you are having database backup and want to restore it then use following command

#mysql user_databasename < database.sql

How to install and configure the CSF (configserver) firewall.

CSF can be used on a wide range of Linux systems, including those running cPanel. Following are the steps to install and configure the CSF.

Installation is quite straightforward:

rm -fv csf.tgz

wget http://www.configserver.com/free/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh

If you would like to disable APF+BFD (which you will need to do if you have
them installed otherwise they will conflict horribly):

sh disable_apf_bfd.sh

That’s it. You can then configure csf and lfd in WHM, or edit the files
directly in /etc/csf/*

csf is preconfigured to work on a cPanel server with all the standard cPanel
ports open. It also auto-configures your SSH port if it’s non-standard on
installation.

To configure CSF modify the config files in /etc/csf/ - or if you are running WHM you can modify the CSF settings in WHM itself.

You should ensure that kernel logging daemon (klogd) is enabled. Typically, VPS
servers have this disabled and you should check /etc/init.d/syslog and make
sure that any klogd lines are not commented out. If you change the file,
remember to restart syslog.

See the readme.txt file for more information.

Uninstallation
==============
Removing csf and lfd is even more simple:

cd /etc/csf
sh uninstall.sh

Note: Please don’t disable the Windows Firewall unless and until you have the other appropriate firewall software installed on your system

There are mainly three methods for disabling the Windows Firewall. The first method is for any user with administrative privileges on an individual machine not remotely or collectively managed in any way. The other two methods are for use windows Administrators on fully managed systems or windows servers.

1) Using the Control Panel

This method is for any user with administrative access to unmanaged systems

1. From the Start menu, select Control Panel, then select Windows Firewall.
2. Select Off, then click Ok.

2) Using Local Policy

This method is for administrators with administrative access to unmanaged systems or locally managed systems where the machine is not part of a Windows 2000 or higher domain.

Go to Start menu >> select Run, here enter gpedit.msc.
Expand the Computer Configuration folder, then the Administrative Templates folder.
Expand the Network folder, then the Network Connections folder, then the Windows Firewall folder.
Select the Standard Profile folder.
Double-click the Windows Firewall: Protect all network connections option.
Select Disabled, then click OK.
Select the Domain Profile folder.
Double-click the Windows Firewall: Protect all network connections option.
Select Disabled, then click OK.
Close the Group Policy dialog box.

3) Using Group Policy

This method is for administrators with administrative access to managed machines that are part of a Windows 2000 or 2003 Active Directory domain.

Create a new Group Policy object, and give the object a descriptive name (for example, ITS-Turn off Windows Firewall).
Select the newly created group policy.
Right-click on the newly created policy and select Edit.
Expand the Computer Configuration folder, then the Administrative Templates folder.
Expand the Network folder, then the Network Connections folder, then the Windows Firewall folder.
Select the Standard Profile folder.
Double-click the Windows Firewall: Protect all network connections option.
Select Disabled, then click OK.
Select the Domain Profile folder.
Double-click the Windows Firewall: Protect all network connections option.
Select Disabled, then click OK.
Close the Group Policy dialog box.
In the Security Filter section, click Add.
Search for the objects that this group policy will be applied to, then click OK.
Close the Group Policy editor.

There are various reasons why an online sector individual suchlike you has decided to shift to a new web hosting providers. Your old web hosting provider be like has real impecunious specialized funding, or their web server is frequently down, or may be your old web hosting supplier cannot have your hosting requirements anymore or you could disclosed a cheaper web hosting assistance? like this many more. Disregarding of the reasons, now you are planning to move to new web hosting provider and you necessity to assign your website from your present web host to the new web entertainer. Below is the step-by-step pass that you can unconstrained of soaring to a new web hosting provider.

Transfer Schedule
Ideally, you should guidance the conveyance one month before you change your old web hosting counseling in organization to possess enough periods to fulfill a untouched soul. Doing channelize in inferior than one month clip under frame will put your website in assay of untracked.

New web hosting service registration
Now, sign-up your new web hosting bringing once you make definite the morpheme familiar mentioned above. Depending on your new web hosting provider, your new web hosting record ordinarily gift be set up within 24 hours.

Files Backup
While ready for your new web host accounting to be created, it is clip to duplication all your web files on the old web hosting provider. In most cases, you already jazz all the files of your website on your local computer. Yet, it is good corking strain to duplication all your files from the old web computer. In element to the usual HTML files, you may impoverishment to approving any script files, databases files, and yet computer logs files if it is required. You should create a directory system that is corresponding to the directory construction on your web server and download the files into the several directories.

Files uploading

Formerly you are notified that your new web hosting invoice has been created, you faculty get asking email from your new web hosting supplier. In that email, it contains all the information required to set up website, this including the FTP login details. With that FTP details, you can now FTP to your new web hosting computer and upload all your files. You should start by oldest creating the directory structures on the web server, and then upload all the files to the respective directory.

It is the time to set any play script files or databases if they are utilized in your website. Likewise, it is a benevolent moment to set up all the email accounts through the administration body.

Once you make smooth uploading all the files and installed the play script files or databases, you can now use the temporary URL to examine your parcel. The temporary URL can be initiate in the request telecommunicate from your new web hosting provider. The temporary URL could be in the stalking initialize: http://your-host-domain/~your-webaccountname

Testing

Using the temporary URL directory, you can now trial your web site online. Due to the fact that incompatible web hosting server may require different computer environs to execute. Hence, you condition to declare all the scripts (such as CGI, Perl) are working accordingly. In addition, you should run all the hyperlinks in the modal web pages if affirmable to secure no humble course. Piece you are investigation finished the temporary URL directory, your website hosted on the old web hosting supplier is move operative.

Channel field nominate

Formerly you score over investigating your new website on the temporary URL and verified it is working utterly. The next step is to get in touch with your domain name register (i.e. the company where you till have your domain register) to modify the old DNS (Domain Name Server) to lie to the new DNS of your new web hosting provider. Unremarkably, the DNS information is sent to you through telecommunicate after you indicate prospering with the new web hosting supplier.

Alternatively, you depart be fit to Field itemize servers test how a domain recite is resolute. Typically, the domain name servers are in multitude split as:

ns1.your-new-web-hosting.com

ns2.your-new-web-hosting.com

Some domain name registrar has need of the IP addresses of the DNS. In this case you have to give the IP addresses of your new DNS. For example:

NS1: 216.193.194.212

NS2: 216.193.207.106

Typically, it takes 24-72 hours to get the DNS record to commute and move through all the WHOIS servers. You can use WHOIS tools on the net much as whois.com to defender the position of the DNS transplant. Once the shifting is completed, you will see the change in your new DNS. Alternatively, you can variety a pardonable change to your internal tender (for instance, adding a new image or symbol) and upload to the new-fangled web hosting server. When you access your site using domain name (www.your-site-name.com) and make sure that DNS has been transferred successfully.

Final Investigating

Now, your website on the new web hosting supplier is officially transferred and online. You should recheck all the tests to assure it is full usable. Once you are official the new website is excavation aright, you can go forward to terminate your old web hosting story.

As a part of marketing and SEO tactic webmasters go for buying text links, some for improving their PR, others for getting traffic and some just for publicity.
When buying links, you need to check for what benefit you will get from that link, will it be able to bring targeted traffic ?
If you get a good traffic through that link, consider your investment has paid for itself.
While buying text links you should considered following thing :

Page Rank: A link from a higher page rank site will give you better positioning and rank, though a link from a higher page ranked sites will be costly. Always try to have your link at high PR site.

Alexa Ranking: Alexa.com provides a rough estimate of the traffic that the website gets. Note that Alexa reports for the whole website, including the subdomain names etc. But still an Alexa ranking less than 100,000 is what you should be check for the linking site as this may ensure for the traffic.

Relevancy: You should always try to purchase links from sites or linking pages that provide content that is related to your site or page content. - You will get the most value from Google when the linking page or linking website provides content that related to your website content.

Visibility : Always check for the placement of your link. The link has to placed in a visible part of the website and not at much deeper page.

Number of Links: Your link should not be placed at a pages having lot of out-going links. This will diminish the value of the Page rank. If it has more than 100 outbound links, more chances are that your site link will lose its link value.

Check for nofallow tag : Your linking site should not be having the rel=”nofollow” tags in the link, which denotes that the search engines (at least Google) will not count the outbound link as valuable. Some webmasters do this blackhat tactic for preserving their PR.

Understanding the Registry :
Registry is the complete repository information of the system.
The Windows 9x/ME/NT/2000/XP Registry is a complex, unified, system wide, continually referenced during operation database, used for centrally storing, locating, editing and administering system, hardware, software and user configuration information, following a hierarchical structure.
It was introduced to replace the text/ASCII based MS-DOS configuration (.BAT, .SYS) and MS Windows initialization (.INI) files.Registry Structure :Registry is divided into five separate structures that represent the Registry database completely. These five groups are known as Keys and they are as below given ;1) HKEY_CURRENT_USER
This registry key contains the configuration information for the user that is currently logged in. The users folders, screen colors, and control panel settings are stored here. This information is known as a User Profile.

2) HKEY_USERS
In windowsNT 3.5x, user profiles were stored locally (by default) in the systemroot\system32\config directory. In NT4.0, they are stored in the systemroot\profiles directory. User-Specific information is kept there, as well as common, system wide user information.

3) HKEY_LOCAL_MACHINE
This key contains configuration information particular to the computer. This information is stored in the systemroot\system32\config directory as persistent operating system files, with the exception of the volatile hardware key.

4) HKEY_CLASSES_ROOT
The information stored here is used to open the correct application when a file is opened by using Explorer and for Object Linking and Embedding. It is actually a window that reflects information from the HKEY_LOCAL_MACHINE\Software subkey.

5) HKEY_CURRENT_CONFIG
The information contained in this key is to configure settings such as the software and device drivers to load or the display resolution to use. This key has a software and system subkeys, which keep track of configuration information.

Each of these keys is divided into subkeys, which may contain further subkeys, and so on. Any key may contain entries with various types of values. The values of these entries can be ;

- String Value
- Binary Value (0 or 1)
- DWORD Value, a 32 bit unsigned integer
- Multi-String Value
- Expandable String Value

Editing Registry :

Always make sure that you know what you are doing when changing the registry or else just one little mistake can crash the whole system. That’s why it’s always good to back it up !
To view the registry (or to back it up), you need to use the Registry Editor tool. There are two versions of Registry Editor ;

To modify the Registry, you need to use a Registry Editor as :

- Start
- Run
- Regedit.exe (Windows 95/98/ME/NT/2000/XP) = located in %WinBootDir% (%SystemRoot%) has the most menu items and more choices for the menu items. You can search for keys and subkeys in the registry.
- Regedt32.exe (Windows NT/2000/XP) = located in %SystemRoot%\System32,enables you to search for strings, values, keys, and subkeys. This feature is useful if you want to find specific data.


What is REG Files
?

.reg file, which can be in the for of ;
- Plain text/ASCII format in Windows 95/98/ME and NT/2000/XP or
- Binary format in Windows 2000/XP

Text .REG files can be easily viewed/created/edited by hand using any text/ASCII editor, like Notepad.

Their purpose is to add, modify or delete Registry (Sub) Keys and/or Values.

If your os keeps on giving you the alert that ur xp is not genuine, you know that it is not but how will you avoid it.

Just try this patch
Lauch Windows Task Manager.
End wgatray.exe process in Task Manager.
Restart Windows XP in Safe Mode.
Delete WgaTray.exe from c:\Windows\System32.

Delete WgaTray.exe from c:\Windows\System32\dllcache.

Lauch RegEdit.

Browse to the following location:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows NT\CurrentVersion\Winlogon\Notify
Delete the folder ‘WgaLogon’ and all its contents
Reboot Windows XP
If it still dont resovle then I will suggest you to reinstall XP and when installing ,any later time, online updates untick the Geniun XP patch or what ever like this.

If you are getting below mentioned error in your client exec

NOTICE: Crontab is not available in your system or you don’t have permissions to use it.
If you receive

If you want it to run from there then you can set it by going to /etc/cron.deny file for the user nobody and remove it.

Its the setting in client exec that allows you to set the cron job for your client exec system. But as the cron client exec set from there is under the ownerhsip of nobody we usually do not allow the cron to run under nobody ownership. But its risky to allow the nobody user to set the cron to run.

So its alwasy better to set the cron from your hosting control panel.

Next Page »