Archive for the ‘Tutorials’ category

Place Some Vital Web Server Security Measures to Ensure Server

October 3rd, 2011

In the era of high end information technology, web is the center stage of all the happenings across the businesses whether online and Offline ventures. Being hooked up with too much data for transactions, web servers are very prone to data hacking from the hackers and web cons. It further results in significant loss of data and crucial information as well. The threat is even more deadly in case of e-commerce websites and other vital online web applications.

Web servers have severe threats from a number of of factors including Unauthorized access, Improper usage of information, Denial of Service and Physical Threats etc. Web hosting experts however suggest a number of measures to fight the menace of web server data threats. The article is all set to illustrate some security measures for the web servers.

Intrusion Detection Systems:
In the terms of web hosting professionals, IDS or Intrusion Detection System is an effective security mechanism that allows seamless protection for network perimeter, extranets and other internal network in real-time framework. A premiere IDS system observes the network data stream to combat any malicious attacks on the system or network. If IDS is put in the place as an appliance and as software, software security should be analyzed first.
Host Security:
Operating System configurations are usually set up by the vendors to push the features and functions, however they leave the security issues easily. Here web hosting experts keep the emphasis on securing the operating system since it will lead to more secured server components automatically. While choosing a operating system, ask for various security checklists like security certification levels, chosen platform Compatibility and remote administration as well as logging utilities.
Secure Coding Habits:
A single flaw in the program code may allow a chance to attackers to compromise a Web server. This is the primary factor that leads to the stringent security measures to combat any security threat to the scripts. In addition, a very stringent Encryption mechanism should be placed during the coding to encrypt the passwords against any potential security breach.

Another major security threat comes in the form of Information Leakage where vital and sensitive data is leaked from the servers in the form of developer comments, error messages or source code. It can compromise the server security and later serious threat to system. Creating and implementing some stringent security firewalls helps web hosting company professionals and other network administrators to fight the bugs. Thus information security should be placed in order to ensure data access to those users only who are authorized to access and use the data.

Summary:

Organizations employ a number of vital security measures to ensure a real time combat against the web server security threats. They deal with the menace like Improper usage of information, Denial of Service and Physical Threats in very proper manner.

Understanding Web Analytics To Measure Website Traffic

October 1st, 2011

Web analytics is all about analyzing traffic on your online business websites. An Internet Marketing expert gathers numerous amount of data on various grounds namely number of the visitors on the page and page views per page etc. Experts know that web analytics not merely a tool for calculating the visitors on the website, but if used with the intelligence, it also acts as a marketing tool, an e-commerce tracker and an eminent ad tool as well. The article here is all set to illustrate several analytics data experts frequently use evaluate the website’s credibility in the premier search engines Viz. Google, Yahoo and Bing.

Choose a Analytics Software That Works:
To put the intended website under the scanner, SEO experts choose a right web analytics tool to put the things in right order. It can be done by signing up for a web analytics account offered by a recognized analytics services provider. Google Analytics is probably the most widely used analytics tool that can easily be integrated in a WordPress site with the help of some small plug-ins.
Track Your Website Conversion Rate:
The conversion rate of a website is the process where visitor completes a process from visiting the website to signing up for the services. For an e-commerce page, a transaction completes with the checkout page where a customers finishes with the end payment of object they purchase.
Attract Visitors To The Target Page:
A web page contains number of pages beyond the home page. Technically, target pages are those pages that are very similar to the web pages but have different value in the context of web page impression. An internet marketing expert knows the importance of the target pages thus putting and emphasizing a page for the visitor response and tracking these with some suitable tools to get the overall idea about the visits and traffic on the target pages.
Impressive Site Search Analytics:
Site search analytics enables internet marketing experts to find out the figure of visitors who are looking for your products and services. Always define a very straight forward manner to let the users enable to get a perfect navigation over the websites. Never allow users a search, you don’t have on the website since it can irate the consumers a bit.

Finally, the most vital part of the web analytics is to track the flow of visitors and the exact navigation they follow to come to the site. To achieve the site analytics and user navigation path, an Internet Marketing Company sets-up some well defined analytics that could easily be integrated with the Adwords accounts.

How to use Chmod

September 29th, 2011

The chmod command is used in Linux-based systems to set permissions on a file or folder. This can be very important in making your website hosted with us function as it should when served to the public.

FTP Usage

If you’re not a Linux guru, this is generally the easiest way to change chmod settings. You can generally modify chmod settings in any FTP client by right clicking on a file or folder and choosing chmod. Generally multiple files or folders can be selected by using the shift or CTRL keys. This feature is also available in the web-based file manager located in your control panel.

CHMOD and File Permission Settings
400 r——– files (won’t let you accidently erase)
444 r–r–r– files (lets everyone read)
600 rw——- files (no one else can read or see files)
644 rw-r–r– files
664 rw-rw-r– files
666 rw-rw-rw- files (note: this could allow serious havoc)
700 rwx—— Programs and Directories
750 rwxr-x— Programs and Directories
755 rwxr-xr-x Programs and Directories
777 rwxrwxrwx Programs and Directories
Note: 777 will produce a wide open executable script, this is dangerous!

SSH Usage

This can also be done via SSH if you’re more familiar with this interface. The chmod command options are specified like this:

$ chmod [options] mode[,mode] file1 [file2 ...]

To view what the permissions currently are, type:

$ ls -l file 
Command line examples
chmod +r file    read is added for all
chmod -x file    execute permission is removed for all
chmod u=rw,go= file    read and write is set for the owner, all permissions are cleared for the group and others
chmod +rw file    change the permissions of the file file to read and write for all.
chmod -R u+w,go-w docs/    change the permissions of the directory docs and all its contents to add write access for the user, and deny write access for everybody else.
chmod file    removes all privileges for all
chmod 664 file    sets read and write access for the owner, the group, and not for all others.
chmod 0755 file    equivalent to u=rwx (4+2+1),go=rx (4+1 & 4+1). The 0 specifies no special modes.
chmod 4755 file    the 4 specifies set user ID and the rest is equivalent to u=rwx (4+2+1),go=rx (4+1 & 4+1).
find path/ -type d -exec chmod a-x {} \;    removes execute permission for all directories (cannot list files) in tree starting from path/ (use ‘-type f’ to match files only).
find path/ -type d -exec chmod a+x {} \;    allows directory browsing (ls for example) for all users if you’ve reset permissions for Samba write access.
chmod -R u+rwX,g-rwx,o-rwx directory    set a directory tree to rwx for owner directories, rw for owner files, — for group and others.
chmod -R a-x+X directory    remove the execute permission on all files in a directory tree, while allowing for directory browsing.

			

Interworx-CP Integration

September 29th, 2011

You can have ClientExec automatically open hosting accounts for your clients in your Interworx-CP server.  The Interworx-CP plugins currently supports shared hosting account creation.

Plugin Configuration

First you need to configure the plugin in ClientExec’s server section (go to admin -> servers) as shown in the picture below.

“Use Secure Connections” should be set to “Yes” if you have cURL and openSSL compiled into PHP.  “Verify Certificate” should be set to “Yes” to ensure for maximum security however if you are having problems with this set to “Yes” try setting it to “No”. The “Access Key” is used to access your Interworx-CP server.  This value is generated within Interworx-CP under the NodeWorx->API Key menu.  Under the “Available Plugin Events” you can check under which events ClientExec will interact with Interworx-CP. At least have “Create” checked to have the accounts created inside Interworx-CP.

Interworx-CP Package Configuration

Before configuring the packages in ClientExec, you must create package templates in Interworx-CP.  This is done under the “SiteWorx” menu by clicking on “Packages”.   Clicking on “Add” in the image below will allow you to add new package templates if there aren’t any setup.  Once configured remember the package name as we will need to enter it in the ClientExec package configuration.

Package Configuration

Now you have to link a given ClientExec package with a Package you must previously create in Interworx-CP. Remember the correspondant package type in ClientExec must have the setting “Show Domain Options” set to Yes in order for the plugin to work.

The first thing you need to do in the package configuration screen is select the server you configured in the previous step and move it to the right side using the [>>] button. Then enter the Interworx-CP package name in the box as previously setup in Interworx-CP.

 

InterWorx – The Only Control Panel that Provides High Availability

September 28th, 2011

When it comes to true high availability, there is only one control panel that provides a proven high availability platform, and that is InterWorx. High availability refers to systems that are continuously operating for a desired length of time.  InterWorx, configured in a high availability cluster, will ensure that a server failure will never affect your website’s operation.

InterWorx is a control panel with a wide array of features for user and domain management as well as management of many other aspects of your virtual environment. If you are looking for a better way to manage your virtual environment, then InterWorx is one of the best control panel programs on the market, especially for high availability. Additionally, InterWorx provides a vast amount of other features and resource management options, such as configurable bandwidth usage and concurrent connections to vital services such as MySQL, IMAP, and other shared resources.

InterWorx may not be as well recognized as other programs on the market, but the feature set on this program is comprehensive and allows full management capabilities for web masters, administrators, or hosting providers. No matter what your management needs are in terms of high availability servers, an InterWorx license will provide you with all of the necessary tools that you need to completely automate and manage your control panel.

A high availability cluster is really only possible with an InterWorx license because there are very few control panel programs on the market that are equipped to handle high availability. An InterWorx license will give you access to all of the features that you need to effectively manage your virtual environment. Since the needs of each administrator, hosting provider, or webmaster will be different, InterWorx has anticipated this and designed a program that is scalable and adaptable, and the fact that it works well on high availability servers makes it an excellent control panel.

Plesk Takes Care of All Your Anti-Virus Needs

September 28th, 2011

Taking care of viruses after they have done the damage is the normal approach that most users have come to expect from their anti-virus providers. However, why not stop the virus BEFORE it gets to your users’ hosting accounts with a hosting anti-virus program. Plesk has made it simple to do this, and with Plesk Anti-Virus, you can easily detect and remove any viruses before they become a problem or start impacting your website negatively. The Plesk system is very advanced in terms of security, and hosting anti-virus protection is so critical to the long term stability of your website and servers. Plesk anti-virus can help protect your critical data and other valuable information so that it cannot be hacked and stolen by malicious users.

Many software programs offer security and hosting anti-virus protection, but it is simply not as comprehensive as it is with a Plesk License. In addition to Plesk Anti-Virus, you can also utilize the new health monitoring tool so that you can ensure that your system is protected from attacks on all sides. You can set up the health monitoring to occur at regular intervals or whenever you see fit, and this can let you automate the task of keeping your server secure. If you do encounter a problem, the Plesk health monitoring system will notify you immediately, and the Plesk Anti-Virus will work to resolve the issue and stop any infiltration into your system. For hosting anti-virus, Plesk is at the top of the industry.

Typically updates take hours to complete and slows the system down quite a bit during regular scanning. With the Plesk Anti-Virus, you no longer have to worry about this because it has the ability to detect over 100,000 viruses quickly and without affecting your server productivity. Security usually requires a multi-faceted approach so the Plesk Anti-Virus paired with the comprehensive health monitoring system is the essential combination to optimal safety on your virtual environment.

How to estimate your website hosting needs

September 26th, 2011

I write this article especially for people who are new to web hosting. This is why I will only talk about the basic needs (in a shared hosting environment): space, bandwidth. Most of the people looking for advanced features (scripting, databases) already know what they want/need anyway.

So let’s start with the space. Web space (disk space) is the amount of data you can store on the hard disk of the web server. Each web hosting accound comes with a certain amount of space, usually over 50 MB and less than 1000 MB.

Obviously, the amount of needed space depends on the size of the website. Most websites are composed of html (text) pages with a few images (gifs or jpegs) or even a little bit of Flash animation. Text is very economical; it occupies very little space. Images and flash are more expensive; they require a lot of space. If you’re new to the web you might think it’s great to have a lot of colorful images to make your website really beautiful. Don’t make this common mistake!

Your aim should be to say as much as you can on a page while maintaining it’s size under 50-60 KB including images. The reason? There are still lots of people using slow dial-up connections of under 56 Kbps. For them a 150 KB will take more that 21 seconds to load. A 60 KB page will take more than 8 seconds to load. That’s still a lot of time! A good page size is under 30 KB. A maximum page size is 50-60 KB.

Considering an average page size of 30 KB, you can put approximately 33 pages on 1Mb of space. If you have 10 MB of space available, you could host 330 pages. I only wish I had so many pages to put online. Don’t worry, I’m working on it!

The idea is this: unless you run a busy forum your needs for space are likely to be rather modest. Just keep in mind to achieve an average of 30KB/page and you should be more than fine even with 10 MB of web space.

Bandwidth is the amount of data that you’re allowed to transfer per month. It includes all uploads and downloads regardless of the protocol used (HTTP, FTP, POP etc.). Bandwidth depends very much on the average page size, but it also depends on the number of visitors your website will have and the average number of pages they visit. For an average page size of 30 KB, 20,000 visitors per month and 3 pages per visitor your website will need about 1800 MB (1.8 GB) of bandwidth per month. Most low cost hosting packages include that amount of bandwidth. Not to mention that 20,000 visitors per month is only a dream for most websites. Most don’t even have 2,000 visitors per month.

I took you through all those numbers just to give you an idea how to estimate your needs. If you’re just launching your website you will not need neither a huge amount of space, neither a huge amount of bandwidth. For 99% of people a hosting account with 10MB of space and 1Gb is more than enough.

Conclusion: Unless you have reasons to believe that your website will definitely have lots of visitors and unless you’ll offer movies or music for download (legally of course ), I see little reason for you to worry about space and bandwidth.

Just make your own calculations and also try to make sure that the host you choose allows account upgrades. That is to make sure you will be able to get more space and/or bandwidth if/when you need it without going through all the trouble of changing hosts.

Creating a New FTP Site Using IIS 7 Manager

April 30th, 2011

The new FTP service makes it easy to create new FTP sites by providing you with a wizard that walks you through all of the required steps to create a new FTP site from scratch.

Step 1: Use the FTP Site Wizard to Create an FTP Site

In this first step you will create a new FTP site that anonymous users can open.

Note: The settings listed in this walkthrough specify “%SYSTEMDRIVE%\inetpub\ftproot” as the path to your FTP site. You are not required to use this path; however, if you change the location for your site you will have to change the site-related paths that are used throughout this walkthrough.

  1. Open IIS 7 Manager. In the Connections pane, click the Sites node in the tree.
  2. As shown in the image below, right-click the Sites node in the tree and click Add FTP Site, or click Add FTP Site in the Actions pane.
    • Create a folder at “%SystemDrive%\inetpub\ftproot”
    • Set the permissions to allow anonymous access:
      1. Open a command prompt.
      2. Type the following command:
        ICACLS "%SystemDrive%\inetpub\ftproot" /Grant IUSR:R /T
      3. Close the command prompt.

  3. When the Add FTP Site wizard appears:
    • Enter “My New FTP Site” in the FTP site name box, then navigate to the %SystemDrive%\inetpub\ftproot folder that you created in the Prerequisites section. Note that if you choose to type in the path to your content folder, you can use environment variables in your paths.
    • When you have completed these items, click Next.

  4. On the next page of the wizard:
    • Choose an IP address for your FTP site from the IP Address drop-down, or choose to accept the default selection of “All Unassigned.” Because you will be using the administrator account later in this walk-through, you must ensure that you restrict access to the server and enter the local loopback IP address for your computer by typing “127.0.0.1″ in the IP Address box. (Note: If you are using IPv6, you should also add the IPv6 localhost binding of “::1″.)
    • Enter the TCP/IP port for the FTP site in the Port box. For this walk-through, choose to accept the default port of 21.
    • For this walk- through, do not use a host name, so make sure that the Virtual Host box is blank.
    • Make sure that the Certificates drop-down is set to “Not Selected” and that the Allow SSL option is selected.
    • When you have completed these items, click Next.

  5. On the next page of the wizard:
    • Select Anonymous for the Authentication settings.
    • For the Authorization settings, choose “Anonymous users” from the Allow access to drop-down, and select Read for the Permissions option.
    • When you have completed these items, click Finish.

Summary

You have successfully created a new FTP site using the new FTP service. To recap the items that you completed in this step:

  1. You created a new FTP site named “My New FTP Site”, with the site’s content root at “%SystemDrive%\inetpub\ftproot”.
  2. You bound the FTP site to the local loopback address for your computer on port 21, and you chose not to use Secure Sockets Layer (SSL) for the FTP site.
  3. You created a default rule for the FTP site to allow anonymous users “Read” access to the files.

Step 2: Adding Additional FTP Security Settings

Creating a new FTP site that anonymous users can browse is useful for public download sites, but web authoring is equally important. In this step, you add additional authentication and authorization settings for the administrator account. To do so, follow these steps:

  1. In IIS 7 Manager, click the node for the FTP site that you created earlier, then double-click FTP Authentication to open the FTP authentication feature page.
  2. When the FTP Authentication page displays, highlight Basic Authentication and then click Enable in the Actions pane.
  3. In IIS 7 Manager, click the node for the FTP site to re-display the icons for all of the FTP features.
  4. You must add an authorization rule so that the administrator can log in. To do so, double-click the FTP Authorization Rules icon to open the FTP authorization rules feature page.
  5. When the FTP Authorization Rules page is displayed, click Add Allow Rule in the Actions pane.
  6. When the Add Allow Authorization Rule dialog box displays:
    • Select Specified users, then type “administrator” in the box.
    • For Permissions, select both Read and Write.
    • When you have completed these items, click OK.

Summary

To recap the items that you completed in this step:

  1. You added Basic authentication to the FTP site.
  2. You added an authorization rule that allows the administrator account both “Read” and “Write” permissions for the FTP site.

Step 3: Logging in to Your FTP Site

In Step 1, you created an FTP site that anonymous users can access, and in Step 2 you added additional security settings that allow an administrator to log in. In this step, you log in anonymously using your administrator account.

Note: In this step log in to your FTP site using the local administrator account. When creating the FTP site in Step 1 you bound the FTP site to the local loopback IP address. If you did not use the local loopback address, use SSL to protect your account settings. If you prefer to use a separate user account instead of the administrator account, set the correct permissions for that user account for the appropriate folders.

Logging in to your FTP site anonymously

  1. On your FTP server, open a command prompt session.
  2. Type the following command to connect to your FTP server:FTP localhost
  3. When prompted for a user name, enter “anonymous”.
  4. When prompted for a password, enter your email address.

You should now be logged in to your FTP site anonymously. Based on the authorization rule that you added in Step 1, you should only have Read access to the content folder.

Logging in to your FTP site using your administrator account

  1. On your FTP server, open a command prompt session.
  2. Type the following command to connect to your FTP server:FTP localhost
  3. When prompted for a user name, enter “administrator”.
  4. When prompted for a password, enter your administrator password.

You should now be logged in to your FTP site as the local administrator. Based on the authorization rule that you added in Step 2 you should have both Read and Write access to the content folder.

Summary

To recap the items that you completed in this step:

  1. You logged in to your FTP site anonymously.
  2. You logged in to your FTP site as the local administrator.

Send Email from a PHP Script Using SMTP Authentication

March 30th, 2011

This post about “Sending Mail using SMTP and PHP“. Now you can send emails with SMTP authentication using this script. Every mail needed server authentication, So you have to buy mail server. It’s very useful you can implement this on your web projects.

This tutorial contains three files.

- Index.php //Run Mail Form
- SMTPconfig.php // SMTP Server Cofiguration
- SMTPClass.php // SMTP Mail Sending Class

SMTPconfig.php
You have to change SMTP server details.

<?php
//Server Address

$SmtpServer=”127.0.0.1″;
$SmtpPort=”25″; //default
$SmtpUser=”username”;
$SmtpPass=”password”;
?>

 

SMTPclass.php
SMTP mail sending class.

<?php

class SMTPClient
{

function SMTPClient ($SmtpServer, $SmtpPort, $SmtpUser, $SmtpPass, $from, $to, $subject, $body)
{

$this->SmtpServer = $SmtpServer;
$this->SmtpUser = base64_encode ($SmtpUser);
$this->SmtpPass = base64_encode ($SmtpPass);
$this->from = $from;
$this->to = $to;
$this->subject = $subject;
$this->body = $body;

if ($SmtpPort == “”)
{
$this->PortSMTP = 25;
}

else

{
$this->PortSMTP = $SmtpPort;
}
}

function SendMail ()
{
if ($SMTPIN = fsockopen ($this->SmtpServer, $this->PortSMTP))
{
fputs ($SMTPIN, “EHLO “.$HTTP_HOST.”\r\n”);
$talk["hello"] = fgets ( $SMTPIN, 1024 );
fputs($SMTPIN, “auth login\r\n”);
$talk["res"]=fgets($SMTPIN,1024);
fputs($SMTPIN, $this->SmtpUser.”\r\n”);
$talk["user"]=fgets($SMTPIN,1024);
fputs($SMTPIN, $this->SmtpPass.”\r\n”);
$talk["pass"]=fgets($SMTPIN,256);
fputs ($SMTPIN, “MAIL FROM: <”.$this->from.”>\r\n”);
$talk["From"] = fgets ( $SMTPIN, 1024 );
fputs ($SMTPIN, “RCPT TO: <”.$this->to.”>\r\n”);
$talk["To"] = fgets ($SMTPIN, 1024);
fputs($SMTPIN, “DATA\r\n”);
$talk["data"]=fgets( $SMTPIN,1024 );
fputs($SMTPIN, “To: <”.$this->to.”>\r\nFrom: <”.$this->from.”>\r\nSubject:”.$this->subject.”\r\n\r\n\r\n”.$this->body.”\r\n.\r\n”);
$talk["send"]=fgets($SMTPIN,256);
//CLOSE CONNECTION AND EXIT …
fputs ($SMTPIN, “QUIT\r\n”);
fclose($SMTPIN);

//

}
return $talk;
}
}
?>

 

index.php

<?php

include(‘SMTPconfig.php’);
include(‘SMTPClass.php’);
if($_SERVER["REQUEST_METHOD"] == “POST”)
{
$to = $_POST['to'];
$from = $_POST['from'];
$subject = $_POST['sub'];
$body = $_POST['message'];
$SMTPMail = new SMTPClient ($SmtpServer, $SmtpPort, $SmtpUser, $SmtpPass, $from, $to, $subject, $body);
$SMTPChat = $SMTPMail->SendMail();
}

?>
<form method=”post” action=”">

To:<input type=”text” name=”to” />
From :<input type=’text’ name=”from” />
Subject :<input type=’text’ name=”sub” />
Message :<textarea name=”message”></textarea>
<input type=”submit” value=” Send ” />
</form>

 

Download Source Code

 

Manner to ensure & secure web hosting.

February 22nd, 2011

If you want a secure and reliable web hosting, you must know some basic things before you confirm a particular web hosting company. The following tips are some of the simple methods to ensure reliable and secure web hosting.

You must select a web hosting company that has dedicated servers. See to that the company has established themselves as secure and reliable web hosting company. A reliable web hosting company must have more than five years of experience in the web hosting field. Only a reliable web hosting company can provide you with reliable and secure service that helps you to expand your website and its operations.

Normally, the web hosting companies offer domain registration. So you need to confirm whether the web hosting company is ready to register a domain name which you desire. The web hosting company must be ready to help you in domain registration.

Make sure that the web hosting company provides you affordable plan for hosting your website. See to that the web hosting rates offered by the web hosting company is affordable and minimal.

A secure web hosting company will regularly monitor security. But you must also ensure whether the company will continuously improve security measures so that it allows secure payments to the customers. Ensure that the web hosting company manages and protects their server by firewalls. This is because a firewall can protect server from any attack and ensures that your website remains functional. If you choose a reliable and reputable web hosting provider it will offer secure servers that cannot be hacked by anyone.

You must also ensure whether the web hosting company offers 100 percent server availability. A reliable web hosting service must provide you strong technical support and must guarantee minimal downtime so that your website will be always accessible to your customers. A reliable web hosting service must offer secure and fast server connection. It must also provide you email virus scanning and spam filtering options.

Make sure that the web hosting company conducts regular backups for its web hosting clients so that you need not worry about losing your website contents when your website collapses unexpectedly.

You must make sure whether the web hosting company will host your website on window or Linux operating system, whichever is best for your website. Since windows operating system and Linux operating system have their own advantages and disadvantages, you should identify the better operating system for your website.

Only if you choose a reliable and secure web hosting company, you can ensure that your website data is safe. Only then you can be sure to contact a professional support team when you face any problems with your website or reliable web hosting package. Once you are hosted on secure servers and have access to well-informed support agents, you can ensure that you are with the right web hosting company.

Your established Web hosting company must offer the most reliable and most powerful web hosting method at affordable price and lowest downtime rates. It must also offer a range of web hosting packages which suits your budget. The web hosting companies must not only offer reliable, secure and affordable web hosting, but must also ensure flexible services and packages that suits your growing business needs.

PHP Freelancer