<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SupportSages &#187; Training</title>
	<atom:link href="http://www.supportsages.com/blog/category/training/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.supportsages.com/blog</link>
	<description>Technical Support and Server Management : Musings in the fox hole.</description>
	<lastBuildDate>Fri, 16 Jul 2010 02:47:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>All about SSL</title>
		<link>http://www.supportsages.com/blog/2010/07/all-about-ssl/</link>
		<comments>http://www.supportsages.com/blog/2010/07/all-about-ssl/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 22:14:05 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[ca bundle]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[crt]]></category>
		<category><![CDATA[csr]]></category>
		<category><![CDATA[digest]]></category>
		<category><![CDATA[digital signature]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[key]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=962</guid>
		<description><![CDATA[﻿﻿﻿﻿SSL or Secure Sockets Layer (Notice the last s in sockets) is used to secure the communication over the internet. This technique was introduced by Netscape. It uses the RSA public key cryptography for encryption/decryption.

In the protocol stack used in the internet. The SSL protocol runs above TCP/IP and below higher-level protocols such as HTTP or IMAP.

The SSL protocol includes two sub-protocols:
1) SSL record protocol
2) SSL handshake protocol

The SSL record protocol defines the format used to transmit data. The SSL handshake protocol involves using the SSL record protocol to exchange a series of messages between an SSL-enabled server and an ...]]></description>
			<content:encoded><![CDATA[<p>﻿﻿﻿﻿SSL or Secure Sockets Layer (Notice the last s in sockets) is used to secure the communication over the internet. This technique was introduced by Netscape. It uses the RSA public key cryptography for encryption/decryption.</p>
<p>In the protocol stack used in the internet. The SSL protocol runs above TCP/IP and below higher-level protocols such as HTTP or IMAP.</p>
<p>The SSL protocol includes two sub-protocols:<br />
1) SSL record protocol<br />
2) SSL handshake protocol</p>
<p>The SSL record protocol defines the format used to transmit data. The SSL handshake protocol involves using the SSL record protocol to exchange a series of messages between an SSL-enabled server and an SSL-enabled client when they first establish an SSL connection.</p>
<p><strong>Now SSL for the layman<br />
<span style="font-weight: normal;">SSL basically creates an encrypted communication channel between the two parties involved in the communication. For a third person involved in the middle of this communication channel, the data seems to be garbled.<span id="more-962"></span></span></strong></p>
<p>Suppose Alice (A, the browser) wishes to communicate with Bob (B, the server) then the exact steps that takes place inorder to begin the encrypted communication are:</p>
<p>1) A -&gt; B	hello<br />
Alice contacts Bob and requests for a private communication (request for an https link at port 443)</p>
<p>2) B -&gt; A	Hi, I&#8217;m Bob, <em>bobs-certificate</em><br />
Bob send back to Alice his certificate. A certificate authenticates that it is Bob who is actually communicating with Alice. It is like a unique ID card displayed.</p>
<p>3) A -&gt; B	prove it<br />
Alice requests Bob to prove his identity.</p>
<p>4) B -&gt; A	Alice, This Is bob <em>{ digest[Alice, This Is Bob] } bobs-private-key</em><br />
Bob sends back a message and its digest encrypted with his private key. This step can also be like sending a document with a digital signature (when you have Alice&#8217;s public key).</p>
<p>5) A -&gt; B	ok bob, here is a secret <em>{secret} bobs-public-key</em><br />
Alice sends back to Bob some secret. Usually a session key encrypted using Bob&#8217;s public key obtained from his certificate</p>
<p>6) B -&gt; A	<em>{some message,MAC}secret-key</em><br />
Next Bob generates a secret key from Alice&#8217;s secret (earlier step) and sends back to Alice the real message and its MAC encrypted with this secret key. This is actually the encrypted website.</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2010/07/ssl-handshake.gif" class="thickbox no_icon" rel="gallery-962" title="ssl handshake"><img class="size-full wp-image-976 aligncenter" title="ssl handshake" src="http://www.supportsages.com/blog/wp-content/uploads/2010/07/ssl-handshake.gif" alt="" width="614" height="525" /></a><strong><span style="text-decoration: underline;">Terminologies</span></strong></p>
<p><strong>Certificate<br />
<span style="font-weight: normal;">This is actually bobs public key containing document which is digitally signed by a certificate issuer&#8217;s private key (like Verisign). In this process Verisign gets all the necessary documents to verify that Bob&#8217;s identity is correct and it gets Bob&#8217;s public key (and some other data like certificate expiry period, Bobs identity) and encrypts it with its own private key. Now Verisign&#8217;s public key comes built-in along with every browser (so that the browser can get bobs public key from within it).</span></strong></p>
<p><strong>Digest<br />
<span style="font-weight: normal;">Digest or more appropriately Message Digest is like a summary of the actual message or a portion of the message. The digest of a message is is unique for every unique message, it is a one way function such that obtaining the digest, it is never possible to recover the original message (This does not involve using any key in the process). Message Digest always appears with the original message. Upon reception of this Message and its digest at the receiver&#8217;s end, the receiver can once again calculate the digest from the original message and verify the integrity of the message.</span></strong></p>
<p><strong>Digital signature<br />
<span style="font-weight: normal;"><strong><span style="font-weight: normal;">Let Bob send a document to Alice which is digitally signed. For this Bob must have Alice&#8217;s public key and Alice must have Bob&#8217;s public key.Bob takes the document, encrypts it first with Alice&#8217;s public key and next with its own private key(Bob&#8217;s)</span></strong></span></strong></p>
<p>B -&gt; A<span style="white-space: pre;"> </span><em>[{message}alices-public-key ]bobs-public-key</em></p>
<p><strong>Session Key</strong><br />
The only secret which is communicated using public key encryption is a session key. Now the session key is chosen from the &#8217;secret&#8217; that the parties accept. the session key could be the secret itself or a portion of the secret or the result when the secret is passed through a previously agreed algorithm. The SSL encrypted communication does&#8217;t necessary have to be created using a public key encryption technique (This uses a lot of overhead, i.e. processing and time), it may be simple symmetric cypher(less overhead) using this session key once agreed upon. There are a variety of cypher suites available (IDEA Blow-fish RSA DES MD5 KEA) and both the parties may choose some encryption technique based on the protocol used (SSL1.0 SSL2.0 TLS etc)</p>
<p><strong>MAC</strong><br />
MAC or Message Authentication Code is similar to the Message Digest we have discussed. It is used to verify the integrity of the Message.</p>
<p><em>MAC := Digest[ some message, secret ]</em></p>
<p><strong><span style="text-decoration: underline;">Files associated with SSL</span></strong></p>
<p><strong>CSR</strong><br />
CSR or Certificate Signing Request is a string of text generated by the server. This file is sent to the SSL vendor while purchasing an SSL. In the process of generating your CSR, you provide a number of details regarding the domain being registered. Excerpts of text from all these are taken to generate your private key. This private key is present only within the server and nowhere else. The content of the CSR basically contains the public key along with all the details you have used. You get this as domain.com.csr or domain_com.csr.</p>
<p><strong>CA bundle</strong><br />
CA (Certificate Authority) bundle file is one which contains the public key of the Certificate Issuer (Like Verisign&#8217;s public key). Usually this is not required while installing the SSL and most browsers will have this detail in advance to decrypt the SSL certificate (the CRT file) from the server. You get this as domain.com.cabundle or domain_com.ca-bundle.</p>
<p><strong>CRT</strong><br />
This is the actuall SSL certificate as obtained from the SSL vendor. It is a file (containing the public key of the domain secured with SSL and other details like the expiry date, owner information, address etc of the SSL) which is encrypted with the private key of the SSL vendor (Digitaly signed by the SSL vendor). You get this as domain.com.crt or domain_com.crt .</p>
<p><strong>Key file</strong><br />
This is the file which holds your private key (strictly confidential material). The file will have the RSA private key as generated by your server software. You get this as customcardsplus.com.key or customcardsplus_com.key. This file is not usually send to your SSL vendor unlike the CSR. You get this as domain.com.key or domain_com.key .</p>
<p><strong>SSL in a cPanel server</strong><br />
Any service can be secured in a communication channel which is encrypted with SSL. Each of this service on the encrypted channel will be on a different port. Some of them are as follows:</p>
<table style="height: 148px;" border="1" cellpadding="3" width="160">
<tbody>
<tr style="text-align: center;">
<td>
<h2><strong>service</strong></h2>
</td>
<td>
<h2><strong>normal</strong></h2>
</td>
<td>
<h2><strong>ssl</strong></h2>
</td>
</tr>
<tr>
<td>http</td>
<td>80</td>
<td>443</td>
</tr>
<tr>
<td>telnet</td>
<td>23</td>
<td>992</td>
</tr>
<tr>
<td>imap</td>
<td>143/220</td>
<td>993</td>
</tr>
<tr>
<td>pop</td>
<td>109/110</td>
<td>995</td>
</tr>
<tr style="text-align: left;">
<td>smtp</td>
<td>25</td>
<td>465</td>
</tr>
</tbody>
</table>
<p>A domain served as a secure webpage will require a dedicated IP (in a shared environment). SSL protocol is designed to use IP-based mapping. SSL does not support host headers. Therefore, you should have a unique IP address assigned to your secure site. These pages are served from the port 443. Let us examine the configuration of such a website in the apache&#8217;s config file /usr/local/apache/conf/httpd.conf.</p>
<p>Every website (in our example domain.com with username: doma) enabled with SSL has a unique set of directives in the VirtualHost section for the 443 port as:</p>
<pre class="brush: bash;">
&lt;VirtualHost 266.11.208.293:443\&gt; Dedicated IP of the domain

ServerName domain.com #Domain name secured with SSL
ServerAlias www.domain.com

DocumentRoot /home/doma/public_html

ServerAdmin webmaster@domain.com
UseCanonicalName off
CustomLog /usr/local/apache/domlogs/domain.com combined

CustomLog /usr/local/apache/domlogs/domain.com-bytes_log &quot;%{%s}t %I .\n%{%s}t %O .&quot;
ScriptAlias /cgi-bin/ /home/doma/public_html/cgi-bin/
SSLEngine on #This directive enables the SSL on this domain
SSLCertificateFile /etc/ssl/certs/www.domain.com.crt #Location of CRT file
SSLCertificateKeyFile /etc/ssl/private/www.doma.com.key #Location of Private key
SSLCACertificateFile /etc/ssl/certs/www.domain.com.cabundle #Location of CAbundle file
CustomLog /usr/local/apache/domlogs/domain.com-ssl_log combined #Log specific for the SSL served webpage
SetEnvIf User-Agent &quot;.*MSIE.*&quot; nokeepalive ssl-unclean-shutdown

&lt;Directory &quot;/home/doma/public_html/cgi-bin&quot;&gt;
SSLOptions +StdEnvVars #This directive will pass mod_ssl environment variables to the server scripts.
&lt;/Directory&gt;

&lt;/VirtualHost&gt;
</pre>
<p>Some times the directive SSLCertificateChainFile is used in place of SSLCACertificateFile. The minimal addition you will have to make to enable SSL in your httpd.conf file is:</p>
<pre class="brush: bash;">
&lt;VirtualHost 192.168.0.1:443&gt;
DocumentRoot /var/www/html
ServerName www.yourdomain.com
SSLEngine on
SSLCertificateFile /path/to/your_domain_name.crt
SSLCertificateKeyFile /path/to/your_private.key
SSLCertificateChainFile /path/to/DigiCertCA.crt
&lt;/VirtualHost&gt;
</pre>
<p>There are two locations where you are likely to find the SSL related files in your cPanel server. Usually the crt, key and the ca bundle are present in the home directory of the user in /home/username/ssl/, if it was installed using the client&#8217;s cpanel. However if the WHM was used instead to install the same, you will find it in /etc/ssl/. In either of these locations you will find two directories: certs/ and private/. certs contain the crt and cabundle while the private contains the keys.</p>
<p>Now you know how ssl works in your server, Any more questions? just comment!</p>
<p align="left"><a  class="tt" href="http://twitter.com/home/?status=All+about+SSL+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F962" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=All+about+SSL+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F962" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2010/07/all-about-ssl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mod_php explained</title>
		<link>http://www.supportsages.com/blog/2010/06/mod_php-explained/</link>
		<comments>http://www.supportsages.com/blog/2010/06/mod_php-explained/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 14:32:58 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[Apache Handler Support]]></category>
		<category><![CDATA[level1]]></category>
		<category><![CDATA[mime type support]]></category>
		<category><![CDATA[mod_php]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=895</guid>
		<description><![CDATA[<h3>Preface</h3>
Like in the case of all apache modules, you can either compile PHP as a  static module or compile it as a dynamic module.  In the case of static  module , you  can't perform any modification for the module without  recompiling the binary to which it is attached.  For eg.  you can't add  ssl support for the mod_php without re-compiling apache as a whole. And any failure in the compilation may cause downtime for the entire webserver also, including plain html support.

The advantage is that it provides a faster  performance, because the  module is initialized  ...]]></description>
			<content:encoded><![CDATA[<h3>Preface</h3>
<p>Like in the case of all apache modules, you can either compile PHP as a  static module or compile it as a dynamic module.  In the case of static  module , you  can&#8217;t perform any modification for the module without  recompiling the binary to which it is attached.  For eg.  you can&#8217;t add  ssl support for the mod_php without re-compiling apache as a whole. And any failure in the compilation may cause downtime for the entire webserver also, including plain html support.</p>
<p>The advantage is that it provides a faster  performance, because the  module is initialized  whenever the apache binary is started.</p>
<p>In the case of a dynamic mod_php installation, the necessary modifications or module additions can be  done by recompiling the module alone. There is no need to recompile the  Apache as the mod_php is not linked with the binary of apache.  But  since the webserver loads the module on the fly, it needs to load,  initialize and then execute the module.  So it can create some level of  slowness while processing php pages.</p>
<p><strong>How does mod_php work? </strong></p>
<p>When PHP  is loaded into Apache as a module (using  mod_php), each Apache process will contain an instance of mod_php or  PHP interpreter also.   The interpreter comes with a bundle of  libraries we enabled during compilation and each  process can make use  of these libraries to process the requests. This means that the  Apache process that just started  to load a simple HTML page  too will  contain a PHP interpreter with all assigned libraries which inturn means resource consumption.</p>
<p>When the webserver gets an HTTP request. The  request header   contains the path to the requested document</p>
<blockquote><p>e.g. access.log:    xx.xx.xx.xx &#8211; - [22/June/2010:21:14:53  -0700] &#8220;GET /info.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42  HTTP/1.1&#8243; 200 2146 &#8220;http://domain.com/info.php&#8221; &#8220;Mozilla/5.0 (X11; U;  Linux i686; en-US; rv:1.9.1.7) Gecko/20100106 Ubuntu/9.10 (karmic)  Firefox/3.5.7&#8243;</p></blockquote>
<p>1. The request will be redirected to the document root of the domain  and then to the file &#8220;info.php&#8221; , if it fails then the corresponding  error message will be given.</p>
<p>2. The info.php file is to be processed. It follows the following  steps</p>
<p>Normally every httpd.conf file will have an entry like this</p>
<blockquote><p>AddType application/x-httpd-php .php5 .php4 .php</p></blockquote>
<p>It instructs the webserver that the files with extension .php  ,.php4,.ph5 are of PHP mime type  . The <strong>TypesConfig</strong> directive sets the location of the MIME     types configuration file.  This file controls what Internet media types are sent to the client for   given file extension(s).  Sending the correct media type to the client   is important so they know how to handle the content of the file.</p>
<blockquote><p>root@new [/usr/local/apache/conf]# cat mime.types | grep  x-httpd-php<br />
application/x-httpd-php-source          phps<br />
application/x-httpd-php          php php3 php4 php5 php6<br />
root@new [/usr/local/apache/conf]#</p></blockquote>
<p>Here we can see that the Mime type to be used for files with  extension .php  is application/x-httpd-php , while the file with .phps  is to be mapped to the php mime type application/x-httpd-php-source .</p>
<p>The webserver identifies that the requested file is of Mime type  x-httpd-php.</p>
<p>To handle or process it , the apache has to load the corresponding  module. Since it is a php type , the module mod_php will be loaded and  it will execute the file.</p>
<p>Since apache is a HTTP server. It gets the HTTP requests and answers  with the HTML code.  So the mod_php will execute the commands within  php flag and creates the HTML page dynamically and send it back to the  client &#8211; internet browser which sent HTTP request.</p>
<p><strong>Security concerns / Implications<br />
</strong></p>
<p>You can see that  every request or execution of a php file through  web is initiated by the webserver. So the webserver acts as the parent  of every php execution through web. It imposes a great security threat.  Since apache is being executed as an apache  user, all process will be  owned by that user. By default  it is &#8220;nobody&#8221; or &#8220;apache&#8221;.  Let me try  to explain.</p>
<p>If your  web application performs some operations in the  db, unless that database (eg: a flat text DB) has built-in access control, you will have to  make the database accessible to the &#8220;nobody&#8221; user. This means a  malicious script could access and modify the database, even without a  username and password.  Such can be the case with various configuration  files too.  Unless you protect these directories or applications with  necessary authorization techniques like .htaccess, session control etc.  There is a high possibility of attack through webapplication.</p>
<p>Another dangerous issue is of root escalation. If the webserver has a bug, by exploiting that bug, a malicious user can gain some root privileges or escalated to root. Its quite  alarming situation as an escalated apache user can do any sort of   actions without any level of authentication.</p>
<p>Also it is difficult to identify the script which performs the  malicious activity as all php scripts will be executed as &#8220;nobody&#8221;</p>
<p>Since PHP applications are executed as web server user, you need to  give access and write permissions for the directories wherever the  application  is supposed to be working. Sometimes you may be forced to  give 777 permissions and it invites lot of attacks.</p>
<p>The files created by php applications will be owned by user &#8220;nobody&#8221; .  So the user will not be able to delete the files unless it is done  through another php application. Otherwise he needs to contact the  server admin to get the same.</p>
<p>As a security measure, we may be forced to block mails from &#8220;nobody&#8221;  users . But it can create mails generated from php applications being  blocked in the server. Various php applications widely used for spamming  . So some servers are configured to block mails from nobody users. This  creates inconvenience to users.</p>
<p align="left"><a  class="tt" href="http://twitter.com/home/?status=mod_php+explained+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F895" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=mod_php+explained+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F895" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2010/06/mod_php-explained/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The very basics of a PHP &#8211; Not for the developers or sysadmins but for a tech support engineer</title>
		<link>http://www.supportsages.com/blog/2010/06/php-basics/</link>
		<comments>http://www.supportsages.com/blog/2010/06/php-basics/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 14:30:46 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Specials]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[basics]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[interpreter]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php modes]]></category>
		<category><![CDATA[php-cgi]]></category>
		<category><![CDATA[sapi]]></category>
		<category><![CDATA[server side scripting]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=890</guid>
		<description><![CDATA[<h3><strong>What is PHP?</strong></h3>
PHP is similar to many other scripting languages like perl,  python etc. But unlike perl and python what makes it stand apart is, its adaptability and power to be used as both <strong>command line</strong> and <strong>server side scripting</strong>.  I hear Yahoo's mail runs on PHP.

I shall try to explain you the difference by executing the same file  on different modes. Don't expect too much from this post.
<h3><strong>Command Line (CLI)
</strong></h3>
<strong>PHP Command Line Interface</strong> or PHP CLI  as the name implies,   is a way of using PHP in the system command line, like below.<span id="more-890"></span>

[php]
# php -i ...]]></description>
			<content:encoded><![CDATA[<h3><strong>What is PHP?</strong></h3>
<p>PHP is similar to many other scripting languages like perl,  python etc. But unlike perl and python what makes it stand apart is, its adaptability and power to be used as both <strong>command line</strong> and <strong>server side scripting</strong>.  I hear Yahoo&#8217;s mail runs on PHP.</p>
<p>I shall try to explain you the difference by executing the same file  on different modes. Don&#8217;t expect too much from this post.</p>
<h3><strong>Command Line (CLI)<br />
</strong></h3>
<p><strong>PHP Command Line Interface</strong> or PHP CLI  as the name implies,   is a way of using PHP in the system command line, like below.<span id="more-890"></span></p>
<pre class="brush: php;">
# php -i | more
phpinfo()
PHP Version =&gt; 5.2.10-2ubuntu6.3

System =&gt; Linux den 2.6.31-15-generic #50-Ubuntu SMP Tue Nov 10 14:54:29 UTC 200
9 i686
Build Date =&gt; Nov 26 2009 14:40:20
Server API =&gt; Command Line Interface
Virtual Directory Support =&gt; disabled
Configuration File (php.ini) Path =&gt; /etc/php5/cli
Loaded Configuration File =&gt; /etc/php5/cli/php.ini
</pre>
<p>In other words when the  SAPI ( Server API) is &#8220;Command Line Interface&#8221; as you see above php-cli acts as a connector between  underlying  php binary and the command / script which invokes php from  shell . This enables processing of the scripts which require php  functions and provide the result after execution of the script.   The  advantage is that it doesn&#8217;t require a browser or webserver  for the  execution. It simply requires a PHP parser ie PHP_CLI. This  type of usage is ideal for scripts regularly        executed using cron  (on *nix or Linux) or Task Scheduler (on        Windows). These scripts  can also be used for simple text        processing tasks. (Okay even image processing tasks <img src='http://www.supportsages.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> )</p>
<p>PHP CLI is available on all popular operating  systems.  The first step we need to ensure is that the CLI SAPI is installed. For this locate php binary path and execute the command as given below</p>
<pre class="brush: bash;">
[george@server3]$ type php
php is /usr/local/bin/php
[george@server3]$ /usr/local/bin/php -v | grep cli
PHP 5.2.9 (cli) (built: Jul 10 2009 19:22:08)
</pre>
<p>The result ensures that the php-cli module is installed. Now let us   see, how to make it work in a shell. The first thing is to identify the exact  path on which php  binary is present. I assume that its  /usr/local/bin/php.</p>
<p>Now create the test file info.php</p>
<p>vi info.php</p>
<pre class="brush: php;">

&lt;?php
phpinfo();
?&gt;
</pre>
<p>Execute the  file from the shell using the command line or shell. If  you intent to use it in a cron specify the binary path (interpreter) as  the first entry of file .</p>
<p><strong>/usr/local/bin/php info.php</strong></p>
<p>Then the out put will be  of the following  format</p>
<pre class="brush: php;">

[geroge@server3]# php info.php | head
phpinfo()
PHP Version =&gt; 5.2.9

System =&gt; Linux server3.xxxxxx.xxx 2.6.18-128.7.1.el5 #1 SMP Mon  Aug 24 08:21:56 EDT 2009 x86_64
Build Date =&gt; Jul 10 2009 19:17:35
Configure Command =&gt;  './configure'  '--enable-bcmath'  '--enable-calendar' '--enable-dbase' '--enable-ftp'  '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes'  '--enable-mbstring' '--enable-pdo=shared' '--enable-soap'  '--enable-sockets' '--enable-zend-multibyte' '--enable-zip'  '--prefix=/usr/local' '--with-curl=/opt/curlssl/'  '--with-tidy=/opt/tidy/' '--with-ttf' '--with-xmlrpc'  '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr'  '--with-litespeed'
Server API =&gt; Command Line Interface
Virtual Directory Support =&gt; disabled
Configuration File (php.ini) Path =&gt; /usr/local/lib
Loaded Configuration File =&gt; /usr/local/lib/php.ini
</pre>
<p>You can see the Application Programming Interface (API) for this  script by  checking the variable <strong>Server API. </strong>In the above test,  it is shown as <strong>Command Line Interface.</strong> The value gets changed  according to the mode of usage or execution.</p>
<p>As I mentioned above the php binary was  invoked  by the php-cli  interpreter. Once php binary executed the query , the result was  returned to the SAPI  ie php-cli, it then passed the results to the  command line.</p>
<p><strong>Why do we use it?</strong></p>
<p>Its a quite handy option to create cron jobs. Some times we may need  to perform some sort of updates or script execution periodically. If we  set  a cron job for this using php, the php-cli option is quite  useful.</p>
<h3><strong>Server-side scripting</strong></h3>
<p>PHP is extensively used for creating dynamic Web pages. You  create pages with PHP and HTML. When a visitor opens the page, the  server processes the PHP commands and then sends the results to the  visitor&#8217;s browser along with the static HTML pages. PHP code is  embedded into the HTML source document and interpreted by a web server  with a PHP processor module, which generates the web page document.</p>
<p>So the minimum requirement for here are the following ones</p>
<p>1.  Web browser ( client side)</p>
<p>2.  Web server</p>
<p>3.   The PHP parser :  which connects the webserver  with the underlying php installation.</p>
<h4>Illustration :</h4>
<p>Now lets us, take the same example. Here I am trying to access the  page through a web browser. Let us see how the result looks like</p>
<p><img title="info_php" src="http://tuxasa.com/blogs/wp-content/uploads/2010/03/info_php.png" alt="info_php" width="625" height="518" /></p>
<p>Here , you can see the difference. In the first case when I executed  the same file from shell  I got the output without any format. Now the  same result is shown as an HTML page.  So let us see  how the conversion  takes pace.</p>
<p>The webserver is  connected to the php with the help of &#8220;Server API&#8221; .  This is called PHP parser  it is either<strong> CGI or Server Module</strong> like apache, litespeed etc. You can see  it is &#8220;CGI&#8221; here, but it can  vary according the mod of installation and webserver it uses. Common values are FastCGI/CGI , Litespeed API, Apache etc</p>
<p>Once the HTTP  / Web server gets the request for the page with php ,  it calls PHP interpreter to generate HTML. Then this HTML is returned to  the client &#8211; internet browser which sent the HTTP request.</p>
<p>I believe you might got some ideas how it works or differs . I shall  try to give  the difference between CGI and a server module on another  post <img src='http://www.supportsages.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h3><strong>Server API (SAPI)</strong></h3>
<p>PHP is meant  to work on all platforms. So it is essential that it  should work with different types of webservers as well.   Every version of  php  comes with a set of Binaries to connect php with various webservers and  it is known as SAPI.  During configuration of php, we  need to give  corresponding options for the webserver to which the interpreter is to be  enabled. Once the php is compiled and installed , the corresponding  SAPI  will be activated. So every communication between the webserver  and PHP will be interpreted  using the corresponding SAPI module enabled.</p>
<p>Apache may use &#8220;Apache Handler&#8221; while LiteSpeed webserver use &#8220;LiteSpeed API&#8221; as the SAPI.</p>
<h3><strong>Extensions </strong></h3>
<p>Being a powerful language which can perform various levels of  operation,  PHP needs to utilize various functions and libraries  installed on the server. For example GD libraries are required for a php  script which performs image manipulations. While a shopping cart or  such applications require db connectivity to be enabled.  Like in the  case of SAPI a lot of such connectors are shipped along with PHP.  To  extend the functionality of php, we enable the necessary libraries while  configuring the application using &#8220;&#8211;with&#8221;  option.</p>
<p>You can create your own php extensions and php modules and compile  them also.  Again, we will have a discussion about it later.</p>
<p align="left"><a  class="tt" href="http://twitter.com/home/?status=The+very+basics+of+a+PHP+-+Not+for+the+developers+or+sysadmins+but+for+a+tech+support+engineer+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F890" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=The+very+basics+of+a+PHP+-+Not+for+the+developers+or+sysadmins+but+for+a+tech+support+engineer+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F890" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2010/06/php-basics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Source compilation of Apache</title>
		<link>http://www.supportsages.com/blog/2010/06/source-compilation-of-apache/</link>
		<comments>http://www.supportsages.com/blog/2010/06/source-compilation-of-apache/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 21:03:45 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[source]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=871</guid>
		<description><![CDATA[<strong>﻿Basics of Compilation of Apache with PHP</strong>

Here we are going to install apache using the source only. The choice of Operating System here is Linux (distro: Centos). The procedure we follow here will lead to a simple apache installation for dynamic loading of php. PHP will be installed as a module to apache. With a little bit of patience and time, all the necessary modules can be installed with apache. I will be giving a brief idea about the installation of the other modules later.
The basics of installation from the source involves mainly three <em>simple</em> steps (assuming you are lucky):

[bash]
./configure
make
make ...]]></description>
			<content:encoded><![CDATA[<p><strong>﻿Basics of Compilation of Apache with PHP</strong></p>
<p>Here we are going to install apache using the source only. The choice of Operating System here is Linux (distro: Centos). The procedure we follow here will lead to a simple apache installation for dynamic loading of php. PHP will be installed as a module to apache. With a little bit of patience and time, all the necessary modules can be installed with apache. I will be giving a brief idea about the installation of the other modules later.<br />
The basics of installation from the source involves mainly three <em>simple</em> steps (assuming you are lucky):</p>
<pre class="brush: bash;">
./configure
make
make install</pre>
<p>./configure creates the MAKEFILE on the fly. We can provide the necessary options to configure. To list the available options in the configuring step use</p>
<pre class="brush: bash;">./configure --help</pre>
<p>&#8211;prefix=/path/&#8230; mentions where the executable and its files are installed. If not mentioned it takes the default values.<br />
&#8211;enable-[Feature] will enable the specified Feature in apache as it is being built. We are only interested in the DSO capability and hence we enable it with: &#8211;enable-so</p>
<p>As a convention we always keep the source code tar ball inside a directory in /usr/src/, thus source installation begins in this directory.</p>
<p><strong>Apache Compilation</strong></p>
<p>Download the required source tar ball of the apache you would like to compile. Here I am installing httpd-2.0.63 from http://httpd.apache.org/download.cgi#apache20. I save it in the /usr/src/ folder.</p>
<pre class="brush: bash;">
cd /usr/src/
wget http://www.bizdirusa.com/mirrors/apache/httpd/httpd-2.0.63.tar.gz</pre>
<p>This will result in the generation of the file httpd-2.0.63.tar.gz</p>
<pre class="brush: bash;">
tar -xzf httpd-2.0.63.tar.gz</pre>
<p>This will result in the creation of the directory httpd-2.0.63. Next enter inside this directory and execute the ./configure command.</p>
<pre class="brush: bash;">
cd httpd-2.0.63
./configure --prefix=/usr/local/webserver --enable-so</pre>
<p>We are installing apache inside /usr/local/webserver and enable DSO to run php as a module to apache. During this process we may get a lot of errors. We resolve these by manually installing the unresolved dependencies either by obtaining their rpms or by using yum. Normally the first dependency we will get to resolve are:</p>
<pre class="brush: bash;">
gcc
glibc
libxml and
their corresponding devel packages</pre>
<p>In the days where there were no package management tools like yum, pirut, apt-get etc. The old rpms served the installation of these packages with some effort. The task of determining the required rpm package for the required architecture and resolving the other dependencies which arise due to the installation of this rpm may be a tedious task. Some sites which helped in obtaining the necessary rpm suited for our installation and its other dependancies are:</p>
<pre class="brush: bash;">

http://rpm.pbone.net/

http://www.rpmfind.net/linux/RPM/

http://ftp.freshrpms.net/

http://dries.ulyssis.org/rpm/packages.html

http://apt.sw.be/

http://rpms.famillecollet.com/ (Remi RPM Repository)</pre>
<p>Once everything goes well (we do the ./configure step again to determine this), the make command is executed.</p>
<pre class="brush: bash;">
make</pre>
<p>If errors are encountered in this stage, We resolve them by installing the unresolved dependencies (Same as the previous step) and then do:</p>
<pre class="brush: bash;">
make clean</pre>
<p>After this we repeat the make command and then issue:</p>
<pre class="brush: bash;">
make install</pre>
<p>This process installs the package finally within the system. Modify the init script ( /etc/rc.d/init.d/httpd or /etc/init.d/httpd they are symbolic links) Or sometimes you may even have to create one from the apache site.</p>
<p>The following is the content of one such init script I have used. The line beginning with apachectl/some/path/here and httpd=/some/path/here have to replaced with the appropriate line we have used in the &#8211;prefix portion of ./configure.</p>
<pre class="brush: bash;">
#!/bin/bash
#
# Startup script for the Apache Web Server
#
# chkconfig: - 85 15
# description: Apache is a World Wide Web server.  It is used to serve \
#              HTML files and CGI.
# processname: httpd
# processname: httpd
# pidfile: /usr/local/apache2/logs/httpd.pid
# config: /usr/local/apache2/conf/httpd.conf
# Source function library.
. /etc/rc.d/init.d/functions
if [ -f /etc/sysconfig/httpd ]; then
. /etc/sysconfig/httpd
fi
# This will prevent initlog from swallowing up a pass-phrase prompt if
# mod_ssl needs a pass-phrase from the user.
INITLOG_ARGS=&quot;&quot;
# Path to the apachectl script, server binary, and short-form for messages.
apachectl=/usr/local/webserver/bin/apachectl
httpd=/usr/local/webserver/bin/httpd
pid=$httpd/logs/httpd.pid
prog=httpd
RETVAL=0
# The semantics of these two functions differ from the way apachectl does
# things -- attempting to start while running is a failure, and shutdown
# when not running is also a failure.  So we just do it the way init scripts
# are expected to behave here.
start() {
echo -n $&quot;Starting $prog: &quot;
daemon $httpd $OPTIONS
RETVAL=$?
echo
[ $RETVAL = 0 ] &amp;amp;&amp;amp; touch /var/lock/subsys/httpd
return $RETVAL
}
stop() {
echo -n $&quot;Stopping $prog: &quot;
killproc $httpd
RETVAL=$?
echo
[ $RETVAL = 0 ] &amp;amp;&amp;amp; rm -f /var/lock/subsys/httpd $pid
}
reload() {
echo -n $&quot;Reloading $prog: &quot;
killproc $httpd -HUP
RETVAL=$?
echo
}
# See how we were called.
case &quot;$1&quot; in
start)
start
;;
stop)
stop
;;
status)
status $httpd
RETVAL=$?
;;
restart)
stop
start
;;
condrestart)
if [ -f $pid ] ; then
stop
start
fi
;;
reload)
reload
;;
graceful|help|configtest|fullstatus)
$apachectl $@
RETVAL=$?
;;
*)
echo $&quot;Usage: $prog {start|stop|restart|condrestart|reload|status&quot;
echo $&quot;|fullstatus|graceful|help|configtest}&quot;
exit 1
esac
exit $RETVAL</pre>
<p>Next we add the daemon name to the list of services and run it. For this follow the below steps.</p>
<pre class="brush: bash;">
chkconfig --add httpd
chkconfig --level 2345 httpd on
chkconfig --list httpd
/etc/init.d/httpd start
lynx http://localhost/ will display the default apache page which means success.</pre>
<p><strong>PHP Compilation</strong><br />
Now we are going to install PHP 5.2.13 from source!<br />
Go to /usr/src/</p>
<pre class="brush: bash;">
cd /usr/src/</pre>
<p>Download the PHP source tarball and extract it</p>
<pre class="brush: bash;">
wget http://in3.php.net/get/php-5.2.13.tar.gz/from/in.php.net/mirror
tar -xzf php*
cd php*</pre>
<p>Just like in the previous apache installation, we are going to do the ./configure step with the required setting which are displayed using</p>
<pre class="brush: bash;">./configure --help</pre>
<p>We are only interested in enabling php as a module (&#8211;with-apxs2) support for mysql (&#8211;with-mysql) and prefix line. So we go for:</p>
<pre class="brush: bash;">
./configure --with-apxs2=/usr/local/webserver/bin/apxs --with-mysql --prefix=/usr/local/webserver/php</pre>
<p>The long command can be written in a shorter, more clearer format with:</p>
<pre class="brush: bash;">
./configure --with-apxs2=/usr/local/webserver/bin/apxs \
--with-mysql \
--prefix=/usr/local/webserver/php</pre>
<p>The same instructions go for the errors here.<br />
Once everything goes smooth:</p>
<pre class="brush: bash;">
make
make install</pre>
<p>We can provide the recommeneded php.ini setting in the path /usr/local/webserver/php/lib (what ever is the &#8211;prefix + /lib) or just copy the recommended settings to /usr/local/webserver/php/lib (This file may have the name php.ini-recommended or php.ini-production)<br />
cp php.ini-recommended /usr/local/webserver/php/lib/php.ini</p>
<p>From now on we can have php&#8217;s index page to be the default index page. For this in the apache&#8217;s config file append index.php to the directive &#8211; DirectoryIndex</p>
<p>The line would thus look like:</p>
<pre class="brush: bash;">
DirectoryIndex index.html index.html.var index.php</pre>
<p>To make make apache call modular php to execute the php script when encountered, add the following lines to the conf file.</p>
<pre class="brush: bash;">
AddType application/x-httpd-php .php
DirectoryIndex index.html index.html.var index.php</pre>
<p>Next to test your installation.<br />
In the default document root, create a phpinfo file with the file name index.php an d the contents as:</p>
<pre class="brush: bash;">
&amp;lt;?
phpinfo();
?&amp;gt;</pre>
<p>Now we will test the apache configuration for any syntax errors and then reload the apache webserver:</p>
<pre class="brush: bash;">
apachectl configtest (No errors should be reported)
/etc/init.d/httpd reload</pre>
<p>Open a browser window and load the localhost as URL, we will be viewing the phpinfo page in here. In the phpinfo page, the portion Configure Command shows the actual compilation time options used while ./configure is used. The row corresponding to Server API mentions how the php is loaded. &#8216;Apache 2.0 Handler&#8217; means that php was loaded as a module of apache. The rest of the values can be globally changed by making the required changes in php.ini or locally in .htaccess (which is possible only because it is loaded as an apache module).</p>
<p><strong>Tips on installing PHP as a CGI</strong></p>
<p>Here we do not require installing apache with the &#8211;enable-so option. A normal installation will do. The installation of php will not require the option &#8211;with-apxs2. However we will have to mention the location of apache source directory with &#8211;with-apache=../apache_1.3.14</p>
<p>In the httpd.conf file you will require adding:</p>
<pre class="brush: bash;">
ScriptAlias /php/ [path where your php folder is located]
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .phtml
Action application/x-httpd-php /php/php5</pre>
<p align="left"><a  class="tt" href="http://twitter.com/home/?status=Source+compilation+of+Apache+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F871" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=Source+compilation+of+Apache+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F871" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2010/06/source-compilation-of-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The domain name to IP resolution process – Part IV/IV &#8211; INTO THE ROOT SERVERS</title>
		<link>http://www.supportsages.com/blog/2010/05/the-domain-name-to-ip-resolution-process-%e2%80%93-part-iviv-into-the-root-servers/</link>
		<comments>http://www.supportsages.com/blog/2010/05/the-domain-name-to-ip-resolution-process-%e2%80%93-part-iviv-into-the-root-servers/#comments</comments>
		<pubDate>Wed, 26 May 2010 18:25:21 +0000</pubDate>
		<dc:creator>arnold</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[backend process of domain name to IP conversion]]></category>
		<category><![CDATA[complete domain name to IP resolution]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[dns for beginners]]></category>
		<category><![CDATA[dns query process]]></category>
		<category><![CDATA[dns root servers]]></category>
		<category><![CDATA[dns working]]></category>
		<category><![CDATA[Domain name]]></category>
		<category><![CDATA[domain name conversion]]></category>
		<category><![CDATA[domain name resolution for beginners]]></category>
		<category><![CDATA[domain name to IP]]></category>
		<category><![CDATA[domain name to IP behind scenes]]></category>
		<category><![CDATA[domain to IP]]></category>
		<category><![CDATA[domain to IP conversion]]></category>
		<category><![CDATA[how domain name is mapped to IP]]></category>
		<category><![CDATA[key file of root servers]]></category>
		<category><![CDATA[root servers]]></category>
		<category><![CDATA[root.zone]]></category>
		<category><![CDATA[who updates root servers]]></category>
		<category><![CDATA[working of dns query]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=855</guid>
		<description><![CDATA[<!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } -->As I have mentioned in the PART III of this article, all the NS in the Internet will be aware of the IP of root servers. This information is provided in a file which comes along with the name server software package. The file is named.root or named.ca (it varies). This file is called  the Root Hint file. It holds the name of the root servers and the corresponding IP at which it should be contacted. This file is usually located in /var/named as named.ca or named.root (if ...]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } -->As I have mentioned in the PART III of this article, all the NS in the Internet will be aware of the IP of root servers. This information is provided in a file which comes along with the name server software package. The file is named.root or named.ca (it varies). This file is called  the Root Hint file. It holds the name of the root servers and the corresponding IP at which it should be contacted. This file is usually located in /var/named as named.ca or named.root (if the NS package is BIND). I have attached below a screen shot of a part of the file.</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2010/05/zone1.png" class="thickbox no_icon" rel="gallery-855" title="zone1"><img class="aligncenter size-full wp-image-856" title="zone1" src="http://www.supportsages.com/blog/wp-content/uploads/2010/05/zone1.png" alt="" width="494" height="562" /></a></p>
<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } -->Here you may see the name of the root server to the left hand side and its IP to it&#8217;s right. The list I have put here has the severs up to D only. This list continues till M ( M.ROOT-SERVERS.NET.) .</p>
<p>The IP of these root servers do not change frequently but it does, once in while. Thus no one cares to update this file. So it is advisable to update this file for anyone running a busy NS. You can easily fetch this file with a <strong><em>dig</em></strong><em> </em>utility:</p>
<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } --><em>dig @a.root-servers.net . ns &gt; root.hints</em></p>
<p>or</p>
<p><em>dig @a.root-servers.net . ns &gt; named.ca</em></p>
<p>You can easily set-up a crontab entry to perform file update once in month.</p>
<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } 		A:link { so-language: zxx } --><strong>What makes Root Servers so special than other servers?</strong></p>
<p>The key file that makes root servers so special is &#8216;root.zone&#8217;. This is contained in all the root severs from  A – M. You can download this file too and view it ! Just note the screen shot in the above page. Two ftp servers are mentioned in the top :   <a  href="ftp://ftp.internic.net/"><span style="color: #000000;">FTP.INTERNIC.NET </span></a>&amp;  RS.INTERNIC.NET . Just do an   &#8216;anonymous&#8217; ftp to the above server and get the file by navigating to the specified directory. I have attached a screen shot of a part of it below.</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2010/05/zone3.png" class="thickbox no_icon" rel="gallery-855" title="zone3"><img class="aligncenter size-full wp-image-858" title="zone3" src="http://www.supportsages.com/blog/wp-content/uploads/2010/05/zone3.png" alt="" width="284" height="427" /></a></p>
<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } -->In the two screen shots, we can observe the name of the Authoritative NS for the gTLD &#8216;.com&#8217;  and ccTLD  &#8216;.in&#8217; . These Authoritative NS for &#8216;.com&#8217; and &#8216;.in&#8217; will have the IP of Authoritative NS for the domains ( second level  or third level ) under it. Similarly all the existing ccTLDs and gTLDs have an entry for their NS in this file.</p>
<p>Now you might wonder: Only the names of the authoritative servers are mentioned here and where to get the IP of these? You need not worry. The IPs are mentioned in the same file after listing NS for all the TLDs. To make things clear I have put a screen print below:</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2010/05/zone5.png" class="thickbox no_icon" rel="gallery-855" title="zone5"><img class="aligncenter size-full wp-image-860" title="zone5" src="http://www.supportsages.com/blog/wp-content/uploads/2010/05/zone5.png" alt="" width="400" height="48" /></a></p>
<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } -->The above is an entry in the same file ( root.zone).  A.GTLD-SERVERS.NET.  is an Authoritative NS for .com TLD. It&#8217;s IPv4 and Ipv6 addresses are mentioned. Similarly, there will be an IP entry for all the all the authoritative name servers for all the TLDs.</p>
<p>Please Note<strong>: </strong>I recommend the reader to compare the above informations with PART III of this article. It will help in clear understanding.</p>
<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } --><strong>Okay. Then who updates this root.zone file?</strong></p>
<p>In 2004, ICANN took over responsibility for the maintenance of the root- servers TLD master file—the file that lists the authoritative servers for each TLD. Distribution of this file to each of the operational root-servers is carried out using secure transactions. To further increase the security, the server providing the root updates is only accessible from the operational root-servers. It is not a publicly visible server.</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2010/05/file.png" class="thickbox no_icon" rel="gallery-855" title="file"><img class="aligncenter size-full wp-image-862" title="file" src="http://www.supportsages.com/blog/wp-content/uploads/2010/05/file.png" alt="" width="610" height="189" /></a></p>
<p align="left"><a  class="tt" href="http://twitter.com/home/?status=+The+domain+name+to+IP+resolution+process+%E2%80%93+Part+IV%2FIV+-+INTO+THE+ROOT+SERVERS+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F855" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=+The+domain+name+to+IP+resolution+process+%E2%80%93+Part+IV%2FIV+-+INTO+THE+ROOT+SERVERS+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F855" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2010/05/the-domain-name-to-ip-resolution-process-%e2%80%93-part-iviv-into-the-root-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Who manages your domain names &amp; your ISPs IP Addresses</title>
		<link>http://www.supportsages.com/blog/2010/03/who-manages-domain-names-ip-addresses/</link>
		<comments>http://www.supportsages.com/blog/2010/03/who-manages-domain-names-ip-addresses/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 17:32:56 +0000</pubDate>
		<dc:creator>Jince</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[Domain names]]></category>
		<category><![CDATA[ICANN]]></category>
		<category><![CDATA[What is a Registry]]></category>
		<category><![CDATA[Who registers my domains]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=641</guid>
		<description><![CDATA[<span style="text-decoration: underline;"><strong>IANA &#38; ICANN</strong></span> - That's the shortest answer! Now here comes the boring explanation ;)

The assignment of identifiers such as addresses and names, to ensure that they are created and allocated in a way that is acceptable to all is the main factor for the success of the Internet. So some sort of centralized organization is required. The organization originally responsible for this task was Internet Assigned Names and Numbers (IANA). IANA was originally charged with the task of managing which IP address blocks had been assigned to different companies and groups, and maintaining periodically-published lists of Internet ...]]></description>
			<content:encoded><![CDATA[<p><span style="text-decoration: underline;"><strong>IANA &amp; ICANN</strong></span> &#8211; That&#8217;s the shortest answer! Now here comes the boring explanation <img src='http://www.supportsages.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>The assignment of identifiers such as addresses and names, to ensure that they are created and allocated in a way that is acceptable to all is the main factor for the success of the Internet. So some sort of centralized organization is required. The organization originally responsible for this task was Internet Assigned Names and Numbers (IANA). IANA was originally charged with the task of managing which IP address blocks had been assigned to different companies and groups, and maintaining periodically-published lists of Internet parameters such as TCP and UDP Port Numbers. It also was in charge of DNS registrations. As the Internet grew, there was the requirement of a additional authority to manage the growing load. So by the mid 90s the Internet Corporation for Assigned names and Numbers (ICANN) came into existence.</p>
<p><em>ICANN is now officially in charge of all of the centralized registration tasks including IP address assignment, DNS domain name assignment, and protocol parameters management.</em></p>
<p>This development would have meant that IANA would have been completely replaced by ICAAN. But that did not happen. Instead, IANA was put under ICANN and is now in charge of IANA. Both organizations are responsible for IP addresses and parameters. Thus there are basically no differences between the two. These two together are at the top level of the Internet&#8217;s Name and Addresses registration and their delegation process. They also maintain the 13 root servers in the world which are at the top of the DNS tree.</p>
<p>For the functioning of the whole DNS system, 2 factors are to be maintained :</p>
<ol>
<li>
<h2><strong>NAMES</strong> (Domain Names)</h2>
</li>
<li>
<h2><strong>NUMBERS</strong> ( IP &amp; TCP-UDP protocol numbers)</h2>
</li>
</ol>
<h1><span style="text-decoration: underline;"><strong>NAMES or DOMAIN NAME SYSTEM (DNS)</strong></span></h1>
<p>The domains at their top level are classified as : <strong> </strong></p>
<ol>
<li><strong>gTLD</strong> (generic Top Level Domain)</li>
<li><strong>ccTLD</strong> (country code Top Level Domain)</li>
</ol>
<p><span style="text-decoration: underline;"><strong>Generic Top Level Domian (gTLD)</strong></span></p>
<p>The initial gTLDs and their original intended organization types were:</p>
<p><strong>.ARPA </strong>: A temporary domain used many years ago for transition from hosts (flat file) to DNS. Its name refers to the ARPAnet, the precursor of the modern Internet. Today this domain is used for reverse DNS resolution.</p>
<p><strong>.COM </strong>: Corporations and businesses.</p>
<p><strong>.EDU </strong>: Universities and other educational organizations.</p>
<p><strong>.GOV </strong>: Government agencies.</p>
<p><strong>.MIL</strong> : Military organizations.</p>
<p><strong>.NET</strong> : Organizations that implement, deal with or manage networking technologies</p>
<p><strong>.ORG :</strong> Other organizations that don&#8217;t fit into any of the classifications above.</p>
<p>The <strong>.ARPA</strong> domain is the “<strong>Address and Routing Parameter Area</strong>” domain and is designated to be used exclusively for Internet-infrastructure purposes. ( Refer: <a  title="ARPA is a bacronym" href="http://encyclopedia.thefreedictionary.com/Address+and+Routing+Parameter+Area" target="_blank">http://encyclopedia.thefreedictionary.com/Address+and+Routing+Parameter+Area</a> ) It is administered by the IANA in cooperation with the Internet technical community under the guidance of the Internet Architecture Board.The .arpa domain currently includes the following second-level domains: ARPA, IN-ADDR.ARPA, IN-ADDR.ARPA, IRIS.ARPA, IP6.ARPA, URI.ARPA, URN.ARPA . So the ARPA domain was not for commercial registration purposes. This left only six categories for all other organizations. Also, the TLDs weren&#8217;t all used as was originally foreseen; for example, the .GOV and .MIL domains were not used for all types of government and military organizations, but primarily for the United States federal government and military. .EDU ended up being used only for universities, again in the United States. This left only three common top-level domains &#8211; .COM, .NET and .ORG &#8211; for almost all other groups and companies that wanted to use the organizational hierarchy. Since there were only three such TLDs, they quickly became very “crowded”, especially the .COM domain. A new fourth domain, .INT for international organizations, was added fairly soon to the original seven, but it too was only for a small number of organizations, such as international standards bodies.These TLDs are intended to provide a place for all companies and organizations to be named based on their organization type. There were originally six such domains, but this has been expanded so that there are now fifteen to meet the growing needs. Please refer to the below link for the complete list :</p>
<p><a  href="http://www.iana.org/domains/root/db/#"></p>
<p>http://www.iana.org/domains/root/db/#</a></p>
<p><span style="text-decoration: underline;"><strong>Country Code Top Level Domain (ccTLD)</strong></span></p>
<p>In theory, the gTLDs would have been sufficient to meet the needs of all the individuals, companies and groups in the world. This is especially true since .ORG by definition is a “catch all” that can include anyone or anything. However, back at the beginning of DNS, its creators recognized that the <strong><em>generic TLDs might not meet the needs of everyone around the world</em></strong>. There are several <strong>reasons</strong> for this, chief among them:</p>
<p><strong>American Monopoly of the Generic Domains</strong> : The United States organizations and companies dominate the generic TLDs. This is not surprising, given that the Internet was first developed in the U.S.A., but it still presents a problem for certain groups. For example, if the United States military controls the .MIL domain where does, say, India&#8217;s military fit into the name space?</p>
<p><strong>Language</strong> : Most of the generic domains are populated by organizations that primarily do business in English. There are hundreds of languages in the world, however, and it&#8217;s easier for the speakers of those tongues if they can more readily locate resources they can understand.</p>
<p><strong>Local Control</strong> : Countries around the world rarely agree on much, and they certainly differ on how organizations within their nations should have their Internet presence arranged. There was a desire on the parts of many to allow nations to have the ability to set up subsets of the name space for their own use.</p>
<p>For these and other reasons, the Internet&#8217;s name space was set up with a set of country code top-level paralleling the generic ones, sometimes called / ccTLD / or geopolitical TLDs since they are based on geopolitical divisions of the world. In this hierarchy, every country of the world is assigned a particular two-letter code as a top-level domain, with a specific authority put in charge of administering the domain. For example, the ccTLD for Great Britain is “.UK”, the one for Canada “.CA” and the one for Japan is “.JP”. The codes often are more meaningful in the local language than in English, incidentally; Germany&#8217;s is “.DE” and Switzerland&#8217;s “.CH”. Refer to the following link for the complete list :<a  href="http://www.iana.org/domains/root/db/#"></a></p>
<p><a href="http://www.iana.org/domains/root/db/#">http://www.iana.org/domains/root/db/#</a></p>
<p>Each country has the authority to set up its TLD with whatever internal substructure it chooses; again, this is the power of a hierarchical structure. Some countries enforce a further geographical substructure at the lower levels. For example, the .US domain for the United States was originally set up so that all second-level domains were two-letter state abbreviations (this was later changed). Below  is the reason</p>
<p><strong>Disadvantage of strict ccTLD implementation :</strong></p>
<p>For eg: We need to know about a company which is located in Germany, say BMW (wow!). As per the ccTLD basis the company site should be somewhat www.bmw.de . The question is, what if we never knew the location of company ? We will obviously not sit and try suffixing those 200 ccTLDs out there. The most obvious URL that we Internet users would type into the browser would be www.bmw.com since we know it is a commercial organization. So this is where the popularity of gTLDs  are exhibited. (Ofcourse with today’s search engines like google, we can manage to find that out. But what if it is the domain of a small store in an unknown country and we do not have the time to google it out ?)</p>
<p>Another fine eg would be this : In the U.S , the authority in charge of this domain chose to make it follow a strict geographical hierarchy, so every domain must be of the form “organization.city.state-code.US”. So, to use this part of the name space, a company “xyz”in Boston must be within the “xyz.boston.ma.us” domain. This format has made the name more longer and harder to guess. Further,  if you weren’t aware of the city in which the company is located,  it would have added to the trouble finding it out. Finally, the<strong> .US authority eventually abandoned the strict geographical hierarchy due to its non-acceptance</strong>.</p>
<p><strong>IANA is responsible for management of the DNS root zone</strong>. The role is in assigning the operators of top-level domains, such as .UK and .COM, and maintaining their technical and administrative details.</p>
<p>Root Zone Database : IANA&#8217;s Root Zone Database contains the authoritative record of the operators of various top-level domains. The Root Zone Database represents the delegation details of top-level domains, including gTLDs such as “.COM”, and country-code TLDs such as “.UK”. As the manager of the DNS root zone, IANA is responsible for coordinating these delegations in accordance with its policies and procedures.</p>
<p><span style="text-decoration: underline;"><strong>DOMAIN NAME REGISTRY, DOMAIN NAME REGISTRAR &amp; DOMAIN NAME REGISTRANT </strong></span></p>
<p><strong><em>or  simply </em></strong></p>
<p><span style="text-decoration: underline;"><strong>REGISTRY, REGISTRAR  &amp;  REGISTRANT</strong></span></p>
<p>A <strong>domain name REGISTRY</strong>, is a database of all domain names registered in a top-level domain. A registry operator, also called a Network Information Center (NIC), is the part of the Domain Name System (DNS) of the Internet that keeps the database of domain names, and generates the zone files which convert domain names to IP addresses. Each NIC is an organisation that manages the registration of Domain names within the top-level domains for which it is responsible, controls the policies of domain name allocation, and technically operates its top-level domain. It is potentially distinct from a domain name registrar.</p>
<p>A <strong>domain name REGISTRAR</strong> is an organization or commercial entity, accredited by the Internet Corporation for Assigned Names and Numbers (ICANN) or by a national country code top-level domain (ccTLD) authority, to manage the reservation of Internet domain names in accordance with the guidelines of the designated domain name registries and offer such services to the public. Such a registrar is know as &#8220;<strong>Accredited Registrar</strong>&#8221; or &#8220;Designated Registrar&#8221;.</p>
<p>A <strong>domain name REGISTRANT</strong> is a person/organization who/which  owns a domain name in the webspace ( i.e. in the world of Internet) so that he /it can create a website and start sharing information on the Internet. Or going by the name, a registrant is the one which approached a registrar and has registered a domain name in his name and is the owner of it. Once became a registrant of a domain name, he is the sole owner of it and no other person on the planet can request for the same domain name in the Internet&#8217;s webspace or namespace until the domain name gets expired and is deleted from the registry thereby becoming publically available.</p>
<p>Did you know a few hosts out there, register the domain name in their own names and not yours ? Get the domains registered in your name.</p>
<p><strong><span style="text-decoration: underline;">Explanation</span></strong></p>
<p>Please refer to the links for the list of gTLDs &amp; ccTLDs. In the tables for gTLDs and ccTLDs, Sponsoring Organisation mentioned, is the &#8220;Domain Name Registry&#8221; for the respective domain. These organisations have been directly authorized by ICAAN to hold the Root Zone Database for the domains they are handling i.e. a  domain registry comes just  below the  ICANN/IANA  in the  DNS  authority hierarchy. One of the famous registry is &#8220;Verisign&#8221; which handles .COM and .NET domains, NeuStar Inc. for .BIZ etc. This means that they are the ultimate authority (excluding ICANN/IANA) for matters pertaining to the TLDs they handle.</p>
<p>In the young age of the DNS, they (Sponsoring Organisation) handled all the name registrations of the domain under their authority. Later on as the Internet became more crowded, the load on them increased. Further more, these organisations increased the charges for registration (Grreeed is human nature <img src='http://www.supportsages.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> ). So with the aim to increase competition in this field and decrease the rates, ICANN made the domain name registration more public i.e. they started lending out the registration right to other private firms. These firms will now have the power to register a domain name into the world of Internet. For this, they will have to register with ICANN for the TLD domain they are interested in. Once they get registered, they will be an ICANN &#8220;Accredited Registrar&#8221; or &#8220;Designated Registrar&#8221; or simply a &#8220;Domain Name Registrar&#8221; (eg: goDaddy). For becoming an accredited registrar, one need not contact ICANN directly. They will have to find out which is the &#8220;Domain Registry&#8221; for the TLD they are interested in and just register at the particular registry&#8217;s website. This is one of the main differences between a &#8220;registry&#8221; and a &#8220;registrar&#8221;. A particular TLD&#8217;s registry has the power to authorize a 3rd party as that TLD&#8217;s accredited registrar and people who wish to start a domain(or website) can buy a domain name from this registrar. One can become an accredited registrar for more than 1 TLDs. For eg : if a company needs to become the accredited registrar for the TLDs &#8211; .com , .biz  and  .coop , they will have to individually register with the : VeriSign Global Registry Services, DotAsia Organisation Ltd. and DotCooperation LLC respectively. Once they get registered  they attain the &#8220;Accredited Registrar&#8221; status for the TLDs .COM, .BIZ &amp; .COOP. Their company name will automatically be entered into the &#8220;Accredited Registrar&#8221; list of ICANN. The company can then go onto provide domain names under .COM, .BIZ &amp; .COOP to clients.</p>
<p>So the IANA/ICANN is responsible for  maintaining the DNS ROOT which is the upper-most part of the DNS hierarchy, and involves delegating administrative responsibility of “top-level domains”, which are the last segment of a domain name, such as .com, .uk and .nz. Part of this task includes evaluating requests to change the operators of country code domains, as well as day-to-day maintenance of the details of the existing operators.</p>
<h1><span style="text-decoration: underline;"><strong>NUMBER SYSTEM</strong></span></h1>
<p>IANA is responsible for global coordination of the Internet Protocol addressing systems, as well as the Autonomous System Numbers (ASN) used for routing Internet traffic. Just like maintaining the Name system, IANA has its subsidiaries for looking after the Number system.</p>
<p>The IP address is a Number resource that IANA manages in addition to many others. The task of assigning IPv4 and IPv6 to the end user in Internet is done in a 2 level hierarchy :</p>
<p><span style="text-decoration: underline;">Level 1  : <strong>RIR &#8211; Regional Internet Registry</strong><br />
</span>( there is no such technical term for this hierarchy separation as &#8220;level 1&#8243; &amp; &#8220;level 2&#8243;&#8230;just mentioned for clear understanding)</p>
<p>The RIRs manage the allocation of IP addresses on a continent basis. These RIRs have the authority to re-allocate them within their respective geographical areas (of continental scope). There  are accordingly  5  RIRs covering the whole globe. The RIRs are the ones which are directly below the IANA in hierarchy. They are :</p>
<p><strong>AFRINIC</strong> (for African Continent) : AfriNIC is a non-government, not-for-profit, membership based organization, based in Mauritius that serves the African Internet Community. AfriNIC is the Regional Registry for Internet Number Resources for Africa.   (http://www.afrinic.net)</p>
<p><strong>APNIC</strong> ( for Asia Pacific region) : APNIC is a not-for-profit organization providing Internet addressing services to the Asia Pacific. It includes India , China , Japan, Aus etc..http://www.apnic.net/)</p>
<p><strong>ARIN</strong> (North America Region) : American Registry for Internet Numbers (ARIN). It covers USA, Canada etc&#8230;(https://www.arin.net)</p>
<p><strong>LACNIC</strong> (Latin America and some Caribbean Islands) : It is a Latin American and Caribbean Islands Internet Registry. (http://lacnic.net/)</p>
<p><strong>RIPE NCC</strong> (for Europe, Middle East and parts of Central Asia) : Réseaux IP Européens Network Coordination Centre. (http://www.ripe.net/)</p>
<p><span style="text-decoration: underline;">Level 2 : <strong>NIR &#8211; National Internet Registry</strong></span></p>
<p>( this is an intermediate registry only for APNIC. for other RIRs it will have another name. )</p>
<p>The NIR is an organization directly under the umbrella of a RIR with the task of coordinating IP address allocations and other Internet resource management functions at a national level within a country.</p>
<p>The following NIRs are currently operating in the APNIC region:</p>
<p>* CNNIC, China Internet Network Information Center<br />
* JPNIC, Japan Network Information Center</p>
<p><span style="text-decoration: underline;">Level 2 : </span><span style="text-decoration: underline;"><strong>Local Internet Registry or Internet Service Provider</strong></span></p>
<p>( this is again level 2 since it is for RIRs other than APNIC )</p>
<p>An Internet Service Provider(ISP) , also sometimes referred to as an Internet Access Provider (IAP), is a company that offers its customers access to the Internet. The ISP connects to its customers using a data transmission technology appropriate for delivering IP datagrams as dial-up, DSL, wireless or dedicated high-speed interconnects. In India we have the following ISPs : BSNL, Reliance, TATA etc..</p>
<p>And finally from the organisations in the Level 2 we the end users get the connection.</p>
<p>Thus in the paragraphs above we saw the authority hierarchy in the management of Internet&#8217;s NAMES &amp; NUMBERS.</p>
<p>In addition to this IANA also directly manages  :</p>
<p>1) <strong>.INT</strong> : designed for the sole use of cross-national organisations, such as treaty organisations, that do not naturally fit into a specific country’s top-level domain. For example, the World Health Organisation uses who.int for its Internet presence, whilst NATO uses nato.int</p>
<p>2) <strong>.ARPA</strong> : The .arpa domain is used internally by Internet protocols, such as for reverse mapping of IP addresses</p>
<p>3) <strong>IDN Practices Repositor</strong>y : Internationalized domain names are domain names represented by native language characters. The native language domain name will be followed by .com or .net. IANA maintains a collection of “IDN tables”, which represent permitted code points (letters) allowed for Internationalised Domain Name registrations in particular registries</p>
<p>4) <strong>Protocol Assignment</strong>s :  IANA is responsible for maintaining many of the codes and numbers contained in a variety of Internet protocols.</p>
<p>Note : Having understood all these one might still wonder the difference between IANA &amp; ICANN. IANA is one of the Internet&#8217;s oldest institutions, with its activities dating back to the 1970s. Today it is operated by ICANN, an internationally-organized non-profit organization set up by the Internet community in Sept. 30 1998 to help coordinate IANA&#8217;s areas of responsibilities. Thus basically there is no difference between them. So their names are used interchangeably in many contexts.</p>
<p align="left"><a  class="tt" href="http://twitter.com/home/?status=Who+manages+your+domain+names+%26+your+ISPs+IP+Addresses+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F641" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=Who+manages+your+domain+names+%26+your+ISPs+IP+Addresses+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F641" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2010/03/who-manages-domain-names-ip-addresses/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get one SSL certificate working for domain.com and www.domain.com without any warnings ?</title>
		<link>http://www.supportsages.com/blog/2009/07/how-to-get-one-ssl-certificate-working-for-domain-com-and-www-domain-com-without-any-warning/</link>
		<comments>http://www.supportsages.com/blog/2009/07/how-to-get-one-ssl-certificate-working-for-domain-com-and-www-domain-com-without-any-warning/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 09:25:55 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[cPanel]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=461</guid>
		<description><![CDATA[I am writing this post, since one of our admin suggested to purchase wild card SSL certificate when a customer reported issues with SSL installation on www.domain.com when he actually purchased domain.com 's SSL certificate. And the issue was escalated when the admin couldn't get it working and customer of our client started threatening to cancel. "domain.com" is a subdomain of ".com", so the wildcard that would work for it would be "*.com". This is why a cert for *.domain.com works for "www.domain.com" but not, "www.sub.domain.com" or "domain.com".

Solution which should have been suggested was UCC certificates and not Wildcard SSL ...]]></description>
			<content:encoded><![CDATA[<p>I am writing this post, since one of our admin suggested to purchase wild card SSL certificate when a customer reported issues with SSL installation on www.domain.com when he actually purchased domain.com &#8217;s SSL certificate. And the issue was escalated when the admin couldn&#8217;t get it working and customer of our client started threatening to cancel. &#8220;domain.com&#8221; is a subdomain of &#8220;.com&#8221;, so the wildcard that would work for it would be &#8220;*.com&#8221;. This is why a cert for *.domain.com works for &#8220;www.domain.com&#8221; but not, &#8220;www.sub.domain.com&#8221; or &#8220;domain.com&#8221;.</p>
<p>Solution which should have been suggested was UCC certificates and not Wildcard SSL certificates. From GoDaddy&#8217;s KnowledgeBase at <a  href="http://help.godaddy.com/article/3908" target="_blank">http://help.godaddy.com/article/3908</a> here is the definition for UCC or Multi domain certificates.</p>
<p>Unified Communications Certificates <span>(UCC)</span> are <span>SSL</span> Certificates that secure <span>multiple</span> <span><span>domain</span></span>s and <span>multiple</span> hostnames within a <span><span>domain</span></span>. They allow you to secure up to 100 <span>domain</span> names in a single certificate and can consolidate all your secure <span>domain</span>s into one certificate.</p>
<p>I believe UCC works based on subjectAltName directive of openSSL, which you can read more about at <a  href="http://www.openssl.org/docs/apps/x509v3_config.html#Subject_Alternative_Name_" target="_blank">http://www.openssl.org/docs/apps/x509v3_config.html#Subject_Alternative_Name_</a></p>
<p>Upto 5 domains, it will cost $90 and with GoDaddy&#8217;s coupon codes you may be able to get it with 10 to 20% discounts <img src='http://www.supportsages.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  We are no way affiliated to GoDaddy or NoDaddy. But not sure of other providers who gives UCCs at lower rate. If you are aware of one, please feel free to comment!</p>
<p>However we had to make it work for the customer and we did it. Since it was a cPanel server having EasyApache 3, we had to do custom modification for the virtualhosts inorder to make sure that it worked even after the changes are made. How to do that will be in one of the next posts, soon.</p>
<p align="left"><a  class="tt" href="http://twitter.com/home/?status=How+to+get+one+SSL+certificate+working+for+domain.com+and+www.domain.com+without+any+warnings+%3F+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F461" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=How+to+get+one+SSL+certificate+working+for+domain.com+and+www.domain.com+without+any+warnings+%3F+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F461" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2009/07/how-to-get-one-ssl-certificate-working-for-domain-com-and-www-domain-com-without-any-warning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rar and unrar archives in linux</title>
		<link>http://www.supportsages.com/blog/2009/07/rar-and-unrar-archives-in-linux/</link>
		<comments>http://www.supportsages.com/blog/2009/07/rar-and-unrar-archives-in-linux/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 11:10:39 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=431</guid>
		<description><![CDATA[<p style="text-align: left;">Rar archived files are very common these days and we have a solution for rar file extraction and compression in linux. To extract rar files we have the unrar application.</p>
<blockquote>
<p style="text-align: left;">To use unrar to extract use the following commands:
unrar e &#60;filename.rar&#62; use this to unpack the rar file in current directory
unrar l &#60;filename.rar&#62; use this to list the files inside the archive
unrar x &#60;filename.rar&#62; use this to extract the files with the full path
unrar t &#60;filename.rar&#62; use this to test the integrity of archive</blockquote>
<p style="text-align: left;">Now for those who wish to compress files into the rar archived ...]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">Rar archived files are very common these days and we have a solution for rar file extraction and compression in linux. To extract rar files we have the unrar application.</p>
<blockquote>
<p style="text-align: left;">To use unrar to extract use the following commands:<br />
unrar e &lt;filename.rar&gt; use this to unpack the rar file in current directory<br />
unrar l &lt;filename.rar&gt; use this to list the files inside the archive<br />
unrar x &lt;filename.rar&gt; use this to extract the files with the full path<br />
unrar t &lt;filename.rar&gt; use this to test the integrity of archive</p></blockquote>
<p style="text-align: left;">Now for those who wish to compress files into the rar archived format, we have the rar application and the following commands will come in handy:</p>
<blockquote><p>rar a &lt;desired filename.rar&gt; &lt;path of directory to archieve&gt; use this to create a normal compressed rar archieve<br />
rar a &lt;desired filename.rar&gt; &lt;path to file1&gt; &lt;path to file2&gt; &lt;path to file3&gt; &#8230; use this more multiple individual files to be archived into a sigle rar file.<br />
rar a -p&lt;password&gt; &lt;desired filename.rar&gt; &lt;path to dir or file&gt; use this to password protect the rar files<br />
rar a -m&lt;level of compression 1-least 5-best&gt; -v&lt;size of each rar file&gt; &lt;desired filename.rar&gt;&lt;path to dir or file&gt; use this to split the file to a number of rar archived files of desired size.</p></blockquote>
<p style="text-align: left;">Now to get all this and install the rar and unrar application, proceed with the following commands:</p>
<blockquote><p>wget http://www.rarlab.com/rar/rarlinux-3.6.0.tar.gz<br />
tar -zxvf rarlinux-3.6.0.tar.gz<br />
cd rar<br />
cp rar unrar /bin</p></blockquote>
<p align="left"><a  class="tt" href="http://twitter.com/home/?status=rar+and+unrar+archives+in+linux+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F431" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=rar+and+unrar+archives+in+linux+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F431" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2009/07/rar-and-unrar-archives-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chapter 10 Editing files in Linux.</title>
		<link>http://www.supportsages.com/blog/2009/05/chapter-10-editing-files-in-linux/</link>
		<comments>http://www.supportsages.com/blog/2009/05/chapter-10-editing-files-in-linux/#comments</comments>
		<pubDate>Tue, 19 May 2009 09:55:59 +0000</pubDate>
		<dc:creator>Fabian</dc:creator>
				<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[edit files]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=259</guid>
		<description><![CDATA[<p style="text-align: left;">There are several tools available in Linux to edit a regular file. The most popular and user text file editor is VI, and VI Modified is called VIM.</p>

<p style="text-align: left;">file - use file command to know the file type
vi  is very hard to learn, but really powerful

<strong>Either learn VI or learn Unix :-</strong>

<strong>VI:-</strong> VI is a vey powerful text editor. The name vi is derived from the shortest unambiguous abbreviation for the command visual in 'ex''; the command in question switches the line editor ex to visual mode.
<p style="text-align: left;">The VI has three mode</p>

<ul>
	<li>Command Mode - simple one/two ...]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">There are several tools available in Linux to edit a regular file. The most popular and user text file editor is VI, and VI Modified is called VIM.</p>
<p style="text-align: left;">file &#8211; use file command to know the file type<br />
vi  is very hard to learn, but really powerful</p>
<p><strong>Either learn VI or learn Unix :-</strong></p>
<p><strong>VI:-</strong> VI is a vey powerful text editor. The name vi is derived from the shortest unambiguous abbreviation for the command visual in &#8216;ex&#8221;; the command in question switches the line editor ex to visual mode.</p>
<p style="text-align: left;">The VI has three mode</p>
<ul>
<li>Command Mode &#8211; simple one/two letter commands</li>
<li>Edit Mode &#8211; Allows to append and insert text</li>
<li>Ex Mode &#8211; allows to execute commands</li>
</ul>
<p style="text-align: left;">Going back and forth modes requires to go to command modeby pressing escape.</p>
<p>Command Mode:-</p>
<p>Arrow keys &#8211; hjkl<br />
w &#8211; moves cursor forward by a word<br />
b &#8211; moves cursor backward by a word<br />
0,$ &#8211; beginning and end of line<br />
Ctrl + f , Ctrl + b &#8211; Page UP, Page Down<br />
Home &#8211; gg<br />
End &#8211; G<br />
:25, 25G &#8211; to the 25th line<br />
% &#8211; matching braces</p>
<p>1. Insertion</p>
<p>Insertion &#8211; I, i<br />
Append &#8211; A, a<br />
Insertion on a new line &#8211; O, o</p>
<p>2. Deletion</p>
<p>Delete a single character under cursor &#8211; x<br />
Delete a single character left of cursor &#8211; X<br />
Delete all the stuff from cursor to end of line &#8211; D<br />
delete 10 words &#8211; 10dw , d10w<br />
Replace a single character &#8211; r<br />
Undo the last change &#8211; u<br />
To repeat last command &#8211; .<br />
To join two lines together &#8211; J</p>
<p>3. Search in command mode</p>
<p>Search for a word downwards &#8211; /word_to_search<br />
Search for a word upwards &#8211; ?word_to_search<br />
Repeat the previous search forward &#8211; n<br />
Repeat the previous search backward &#8211; N</p>
<p>4. Search and Replace in ex mode</p>
<p>Change a single character &#8211; r<br />
Replace mode by typing over &#8211; R<br />
Search and replace first occurence of old_word with new_word in the entire file &#8211; :%s/old_word/new_word/<br />
Search and replace first occurence in the current line &#8211; :s/search/replace/<br />
Search and replace all occurences in the entire file &#8211; :%s/search/replace/g<br />
Search and replace all occurences in current line &#8211; :s/search/replace/g<br />
Search and replace the first occurence of old_word between n1 and n2 with new_word &#8211; :n1,n2s/old_word/new_word/<br />
Search and replace all occurences of old_word between n1 and n2 with new_word &#8211; :n1,n2s/old_word/new_word/<br />
Search and replace all occurences of old_word with new_word, but prompt for confirmation &#8211; :1,$s/old_word/new_word/gc</p>
<p>5. Cut/Copy/Paste</p>
<p>Cut the entire line &#8211; dd<br />
Copy the entire line &#8211; yy<br />
Cut the word from the current cursor position to its end &#8211; dw<br />
Paste &#8211; p, P<br />
Swap the adjacent lines &#8211; ddp<br />
Cut 10 lines &#8211; 3dd</p>
<p>6. Exiting VI</p>
<p>Save in ex mode &#8211; :w<br />
Exit in ex mode &#8211; :q<br />
Forcefully save in ex mode = :w!<br />
Forcefully exit in ex mode, when a change is made accidentally = :q!<br />
Save and Exit in command mode &#8211; ZZ<br />
Save and Exit in ex mode &#8211; :wq, <img src='http://www.supportsages.com/blog/wp-includes/images/smilies/icon_mad.gif' alt=':x' class='wp-smiley' /><br />
Save and Exit in ex mode forcefully : wq!</p>
<p>7. Advanced VI to ponder with</p>
<p>:map to map the new defined command to a sequence of commands or keystrokes<br />
:map Ctrl+v_Ctrl+v_Space Ctrl+v_Ctrl+f means pressing space will enable page down.  Ctrl + v is to input a special character such as Esc.<br />
Encryption &#8211; :X and disable encryption :set key=</p>
<p style="text-align: left;"><em>So &#8220;Either learn VI or learn Unix&#8221; <img src='http://www.supportsages.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </em></p>
<p style="text-align: left;">
<p style="text-align: left;"><em> </em></p>
<p align="left"><a  class="tt" href="http://twitter.com/home/?status=Chapter+10+Editing+files+in+Linux.+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F259" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=Chapter+10+Editing+files+in+Linux.+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F259" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2009/05/chapter-10-editing-files-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chapter 9 Advanced Linux commands!</title>
		<link>http://www.supportsages.com/blog/2009/05/chapter-9-advanced-linux-commands/</link>
		<comments>http://www.supportsages.com/blog/2009/05/chapter-9-advanced-linux-commands/#comments</comments>
		<pubDate>Sat, 16 May 2009 09:43:43 +0000</pubDate>
		<dc:creator>Fabian</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[hardware details]]></category>
		<category><![CDATA[hardware info]]></category>
		<category><![CDATA[list usb devices]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=250</guid>
		<description><![CDATA[Let's go advanced ! Here are some advanced linux commands to list the hardware details..

<strong>Device Identification commands:</strong>-

/usr/src/linux/Documentation/devices.txt

hardinfo

hwinfo - Shows detailed information about any hardware.

Usage --&#62; hwinfo --help
<blockquote>=================================
O/p of hwinfo --mouse command ran on a laptop with touchpad and a ps/2 optical mouse connected to a USB port using a PS/2-USB converter

hwinfo --mouse
38: USB 00.1: 10503 USB Mouse
[Created at usb.122]
UDI: /org/freedesktop/Hal/devices/usb_device_a81_205_noserial_if1
Unique ID: iVWJ.8QOQCbci8S5
Parent ID: pBe4.vfMN5defVA1
SysFS ID: /devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1:1.1
SysFS BusID: 2-1:1.1
Hardware Class: mouse
Model: "CHESEN PS2 to USB Converter"
Hotplug: USB
Vendor: usb 0x0a81 "CHESEN"
Device: usb 0x0205 "PS2 to USB Converter"
Revision: "0.10"
Compatible to: int 0x0210 0x0015
Driver: "usbhid"
Driver Modules: "usbhid"
Device File: /dev/input/mice (/dev/input/mouse1)
Device Files: /dev/input/mice, /dev/input/mouse1, /dev/input/event3, ...]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s go advanced ! Here are some advanced linux commands to list the hardware details..</p>
<p><strong>Device Identification commands:</strong>-</p>
<p>/usr/src/linux/Documentation/devices.txt</p>
<p>hardinfo</p>
<p>hwinfo &#8211; Shows detailed information about any hardware.</p>
<p>Usage &#8211;&gt; hwinfo &#8211;help</p>
<blockquote><p>=================================<br />
O/p of hwinfo &#8211;mouse command ran on a laptop with touchpad and a ps/2 optical mouse connected to a USB port using a PS/2-USB converter</p>
<p>hwinfo &#8211;mouse<br />
38: USB 00.1: 10503 USB Mouse<br />
[Created at usb.122]<br />
UDI: /org/freedesktop/Hal/devices/usb_device_a81_205_noserial_if1<br />
Unique ID: iVWJ.8QOQCbci8S5<br />
Parent ID: pBe4.vfMN5defVA1<br />
SysFS ID: /devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1:1.1<br />
SysFS BusID: 2-1:1.1<br />
Hardware Class: mouse<br />
Model: &#8220;CHESEN PS2 to USB Converter&#8221;<br />
Hotplug: USB<br />
Vendor: usb 0&#215;0a81 &#8220;CHESEN&#8221;<br />
Device: usb 0&#215;0205 &#8220;PS2 to USB Converter&#8221;<br />
Revision: &#8220;0.10&#8243;<br />
Compatible to: int 0&#215;0210 0&#215;0015<br />
Driver: &#8220;usbhid&#8221;<br />
Driver Modules: &#8220;usbhid&#8221;<br />
Device File: /dev/input/mice (/dev/input/mouse1)<br />
Device Files: /dev/input/mice, /dev/input/mouse1, /dev/input/event3, /dev/input/by-id/usb-CHESEN_PS2_to_USB_Converter-event-mouse, /dev/input/by-path/pci-0000:00:1d.1-usb-0:1:1.1-event-mouse, /dev/input/by-id/usb-CHESEN_PS2_to_USB_Converter-mouse, /dev/input/by-path/pci-0000:00:1d.1-usb-0:1:1.1-mouse<br />
Device Number: char 13:63 (char 13:33)<br />
Speed: 1.5 Mbps<br />
Module Alias: &#8220;usb:v0A81p0205d0010dc00dsc00dp00ic03isc01ip02&#8243;<br />
Driver Info #0:<br />
Buttons: 5<br />
Wheels: 1<br />
XFree86 Protocol: explorerps/2<br />
GPM Protocol: exps2<br />
Config Status: cfg=new, avail=yes, need=no, active=unknown<br />
Attached to: #33 (Hub)</p>
<p>42: ADB 00.0: 10502 Bus Mouse<br />
[Created at input.159]<br />
UDI: /org/freedesktop/Hal/devices/computer_logicaldev_input<br />
Unique ID: kZYT.9XB1QYZ8Aa7<br />
Hardware Class: mouse<br />
Model: &#8220;Apple Macintosh mouse button emulation&#8221;<br />
Vendor: int 0&#215;0100 &#8220;Apple&#8221;<br />
Device: int 0&#215;0300 &#8220;Macintosh mouse button emulation&#8221;<br />
Compatible to: int 0&#215;0210 0&#215;0003<br />
Device File: /dev/input/mice (/dev/input/mouse0)<br />
Device Files: /dev/input/mice, /dev/input/mouse0, /dev/input/event0<br />
Device Number: char 13:63 (char 13:32)<br />
Driver Info #0:<br />
Buttons: 3<br />
Wheels: 0<br />
XFree86 Protocol: explorerps/2<br />
GPM Protocol: exps2<br />
Config Status: cfg=new, avail=yes, need=no, active=unknown</p>
<p>44: PS/2 00.0: 10500 PS/2 Mouse<br />
[Created at input.159]<br />
UDI: /org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port_logicaldev_input<br />
Unique ID: AH6Q.845qvaQafo3<br />
Hardware Class: mouse<br />
Model: &#8220;SynPS/2 Synaptics TouchPad&#8221;<br />
Vendor: int 0&#215;0212<br />
Device: int 0&#215;0001 &#8220;SynPS/2 Synaptics TouchPad&#8221;<br />
Compatible to: int 0&#215;0210 0&#215;0003<br />
Device File: /dev/input/mice (/dev/input/mouse2)<br />
Device Files: /dev/input/mice, /dev/input/mouse2, /dev/input/event4, /dev/input/by-path/platform-i8042-serio-4-event-mouse, /dev/input/by-path/platform-i8042-serio-4-mouse<br />
Device Number: char 13:63 (char 13:34)<br />
Driver Info #0:<br />
Buttons: 3<br />
Wheels: 0<br />
XFree86 Protocol: explorerps/2<br />
GPM Protocol: exps2<br />
Config Status: cfg=new, avail=yes, need=no, active=unknown</p>
<p>=================================</p></blockquote>
<p>MAKEDEV and mknod &#8211; mentioned earlier</p>
<p>lspci &#8211; list devices using Peripheral Component Interconnect bus. Options to check out is lspci -t and -v<br />
lsdev  &#8211; options to check are -P, -H, -C<br />
lsusb &#8211; lsusb is a utility for displaying information about USB buses in the system and the devices connected to them.<br />
lssci &#8211; lists your scsi devices<br />
hdparm &#8211; display drive geometry<br />
dmidecode &#8211; Reports information about your system&#8217;s hardware as described in your system BIOS, overriding the information kernel gives you inside /proc</p>
<p align="left"><a  class="tt" href="http://twitter.com/home/?status=Chapter+9+Advanced+Linux+commands%21+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F250" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=Chapter+9+Advanced+Linux+commands%21+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F250" title="Post to Twitter">Tweet This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2009/05/chapter-9-advanced-linux-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
