<?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</title>
	<atom:link href="http://www.supportsages.com/blog/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>Thu, 05 Jan 2012 03:05:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Chapter 12 All about a process running in linux</title>
		<link>http://www.supportsages.com/blog/2012/01/all-about-a-process-running-in-linux/</link>
		<comments>http://www.supportsages.com/blog/2012/01/all-about-a-process-running-in-linux/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 06:00:40 +0000</pubDate>
		<dc:creator>vince</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=1954</guid>
		<description><![CDATA[<!-- p { margin-bottom: 0.08in; }h3 { margin-bottom: 0.08in; }pre.cjk { font-family: "DejaVu LGC Sans Mono",monospace; } -->
<ul><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"><strong>Program 	Vs Process</strong></span></span>&#160;
	<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">A 	program is an executable file, while a process is a program in 	execution. A<span style="color: #000000;"> program is a set of instructions written down to do something, while </span><span style="color: #000000;">a 	process is the result of executing a program.</span></span></span></li>
</ul>
<ul>
	<li><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"><strong>Process 	Vs Thread</strong></span></span></span></li>
</ul>
<a href="http://www.supportsages.com/blog/wp-content/uploads/2012/01/pic.jepg_.png"><img class="aligncenter size-medium wp-image-1955" title="pic.jepg" src="http://www.supportsages.com/blog/wp-content/uploads/2012/01/pic.jepg_-291x300.png" alt="" width="291" height="300" /></a>
<ul><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="color: ...]]></description>
			<content:encoded><![CDATA[<p><!-- p { margin-bottom: 0.08in; }h3 { margin-bottom: 0.08in; }pre.cjk { font-family: "DejaVu LGC Sans Mono",monospace; } --></p>
<ul><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"><strong>Program 	Vs Process</strong></span></span>&nbsp;</p>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">A 	program is an executable file, while a process is a program in 	execution. A<span style="color: #000000;"> program is a set of instructions written down to do something, while </span><span style="color: #000000;">a 	process is the result of executing a program.</span></span></span></li>
</ul>
<ul>
<li><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"><strong>Process 	Vs Thread</strong></span></span></span></li>
</ul>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2012/01/pic.jepg_.png" class="thickbox no_icon" rel="gallery-1954" title="pic.jepg"><img class="aligncenter size-medium wp-image-1955" title="pic.jepg" src="http://www.supportsages.com/blog/wp-content/uploads/2012/01/pic.jepg_-291x300.png" alt="" width="291" height="300" /></a></p>
<ul><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="color: #000000;"><span style="font-size: small;">A 	process and a thread is almost the same, and the only worthwhile 	difference between a thread and a process is that threads share the 	same address space completely and hence require less creation time. 	P</span></span><span style="color: #000000;">rocesses 	are independent execution units that contain their own state 	information, use their own address spaces, and only interact with 	each other via inter-process communication mechanisms. A</span><span style="color: #000000;"><span style="font-size: small;"> thread is a coding construct that doesn&#8217;t affect the architecture of 	an application. A single process might contains multiple threads; 	all threads within a process share the same state and same memory 	space, and can communicate with each other directly, because they 	share the same variables.<br />
</span></span></span>&nbsp;</p>
<li><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">User 	process is a process run by a human user</span></span></span></li>
<li><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">A 	service or a daemon process which can be time based or event based 	usually triggered by root or the system itself while on bootup and 	infact a never ending process which triggers other processes.</span></span></span></li>
<li><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"><strong>PID</strong> &#8211; Process ID &#8211; The id of a process, each process running on a system 	is assigned itś own process ID.</span></span></span></li>
</ul>
<ul>
<li><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"><strong>PPID</strong> &#8211; Parent Process ID &#8211; PID of the process that created the child 	process. pstree shows the relation b/w parent process and other 	process, starting from  init.</span></span></span></li>
<li><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"><strong>Job 	ID</strong> &#8211; Job ID is unique to a shell instance. Can be displayed using 	the command &#8220;jobs&#8221;. A process when hit a &#8220;Ctrl+Z&#8221; 	shows the job id, when it says Stopped .The command jobs shows 	background processes, both stopped and running. The process having a 	+ symbol toward the right of job id means that process will be 	responding to fg without options (without job id being passed as 	argument) and the &#8211; sign to any process, if any indicates that it is 	that process which inherits the + sign after the process having + 	sign is done with.</span></span></span></li>
<li><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">bg 	%job_id or bg PID will let the process with job_id to run again.<br />
</span></span></span></li>
</ul>
<p><span style="color: #000000;"> <span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">A few process related commands with options:</span></span><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"> </span></span></span></p>
<p><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">ps command (process status) will display snapshot information of all active processes.</span></span></span></p>
<h3><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">To display all the processes running in the system</span></span></span></h3>
<p><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">Use “ps aux”, as shown below.</span></span></span></p>
<pre><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"><a  href="http://www.supportsages.com/blog/wp-content/uploads/2012/01/pasaux1.jpg" class="thickbox no_icon" rel="gallery-1954" title="pasaux"><img class="aligncenter size-full wp-image-1967" title="pasaux" src="http://www.supportsages.com/blog/wp-content/uploads/2012/01/pasaux1.jpg" alt="" width="625" height="423" /></a>
</span></span></span><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">You can also use “ps -ef | more”, to get a similar output</span></span></span></pre>
<p><a name="more-283"></a> <span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">Use ¨pstree¨ to get output like this:</span></span></span></p>
<p><a href="http://www.supportsages.com/blog/wp-content/uploads/2012/01/pstree.jpg"><img class="aligncenter size-full wp-image-1970" title="pstree" src="http://www.supportsages.com/blog/wp-content/uploads/2012/01/pstree.jpg" alt="" width="616" height="416" /></a></p>
<ul>
<li><span style="color: #111111;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"><strong>Nice 	Value:</strong></span></span></span><span style="color: #111111;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">It 	is used to run a program with modified scheduling priority . 	Nicenesses  range  from  -20 (most favorable scheduling) to 19 	(least favorable). Nice is to start a process with a priority like 	nice -n 10 mp3blaster</span></span></span></li>
<li><span style="color: #111111;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"><strong>Renice</strong> &#8211; renice is to change the priority of an existing process like : 	renice 10 PID</span></span></span></li>
</ul>
<ul>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><strong>kill</strong> &#8211; terminate a process<br />
The  command  kill  sends  the specified 	signal to the specified process or  process group.  If no signal is 	specified, the TERM signal  is  sent. </span></li>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">kill 	- kill %job_id or kill PID / man 7 signal </span></li>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">kill 	-15 PID &#8211; cleaner or soft killing of process &#8211; 			  SIGTERM </span></li>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">kill 	-9 PID &#8211; hard kill  &#8211; SIGKILL </span></li>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">kill 	-19 PID &#8211; Stop the process &#8211; STOP </span></li>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">kill 	-18 PID &#8211; resume the stopped process &#8211; SIGCONT </span></li>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">kill 	-2 PID &#8211; equivalent to Ctrl + C &#8211; SIGINT </span></li>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">kill 	-1 PID &#8211; Hangup  &#8211; SIGHUP </span></li>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">kill 	-3 PID &#8211; end process &amp; core dump</span></li>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">killall</span></li>
</ul>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">More information regarding &#8216;kill&#8217; can be found at the man page</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">[root@localhost ~]# man kill </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><br />
</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><strong>Top</strong> &#8211; Display Linux tasks</span></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2012/01/top.jpg" class="thickbox no_icon" rel="gallery-1954" title="top"><img class="aligncenter size-full wp-image-1972" title="top" src="http://www.supportsages.com/blog/wp-content/uploads/2012/01/top.jpg" alt="" width="613" height="411" /></a></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">The  top program provides a dynamic real-time view of a running system.  It can display system summary information as well as a list of tasks currently  being managed by the Linux kernel.</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">top &#8211; Sort by CPU -&gt; P </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">Sort by MEM -&gt; M </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">Sort by PID -&gt; N </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">Kill by PID -&gt; k </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">Renice by PID -&gt; r </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">List by user -&gt; u </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">Active processes or non idle process -&gt; i</span></p>
<ul>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><strong>nohup</strong> &#8211; will stop a process from being killed even if you logs off the 	system before it completes. It ignores the hangup and quit signals.</span></li>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><strong>pgrep</strong></span><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"> &#8211; process grep.</span></li>
</ul>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"> pgrep looks through the currently running processes and lists  the  process IDs  which matches the selection criteria to stdout.  All the criteria have  to match. </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">For example, pgrep -u root sshd </span></p>
<ul>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><strong>pidof</strong></span><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"> &#8211;  find the process ID of a running program.  finds the process id’s 	(pids) of the named programs. It prints those  id’s on the 	standard output. An example is given below</span></li>
</ul>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><a  href="http://www.supportsages.com/blog/wp-content/uploads/2012/01/pidof.jpg" class="thickbox no_icon" rel="gallery-1954" title="pidof"><img class="aligncenter size-full wp-image-1974" title="pidof" src="http://www.supportsages.com/blog/wp-content/uploads/2012/01/pidof.jpg" alt="" width="626" height="423" /></a><br />
</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"> </span></p>
<ul>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><strong>PPID</strong></span><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"> &#8211; Parent Process ID </span></li>
</ul>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">The process parent PID, the creator of the process.</span></p>
<ul>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><strong>STAT</strong> &#8211; Process Status</span></li>
</ul>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">These functions return information about the specified file. You do not need any access right to the file to get this information but you need search rights to all directories named in the path to the file.</span></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2012/01/stat.jpg" class="thickbox no_icon" rel="gallery-1954" title="stat"><img class="aligncenter size-full wp-image-1975" title="stat" src="http://www.supportsages.com/blog/wp-content/uploads/2012/01/stat.jpg" alt="" width="622" height="420" /></a></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">TTY &#8211; Controlling Terminal</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">It  print the file name of the terminal connected to standard input .</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">[root@localhost ~]# tty </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">/dev/pts/5 </span></p>
<ul>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><strong>PRI</strong> &#8211; Priority number.</span></li>
</ul>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">Lower the number, higher the priority, from +19 to -20. The priority numbers available for the system is from +39 to -60, while -20 to -60 is reserved for kernel threads. A normal user can have priorities from 0 to +20, and negative values as well as reducing the values are allowed only to root.</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">NI &#8211; Dynamic priority value , ranges from +19 to -20</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">TIME &#8211; total CPU time used</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">Process Status (STAT) Codes can be of any of these. </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">D   uninterruptible sleep (usually IO) &#8211; cannot be terminated at          		the moment. </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">R   runnable (on run queue) &#8211; can be run </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">S   sleeping &#8211; waiting for an external event </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">T   traced or stopped &#8211; is suspended. </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">Z   a defunct (&#8220;zombie&#8221;) process &#8211; has terminated itself. </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">X   Extinct &#8211; is dead </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">Setting limits on the number of processes that can run.</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">The command &#8220;ulimit&#8221; is used to limit the number of processes users can run along with available system resources. All processes which will be started from the shell (bash in many cases), will have the same resource limits. To set the limits for daemons which are running at boot time add ulimit </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">command to boot scripts. See apache startup script. </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">/etc/security/limits.conf</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">For example:</span></p>
<pre><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">[root@localhost ~]#ulimit -S -m 1000000</span></span></span>
<span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">[root@localhost ~]# ulimit -S -v 500000</span></span></span></pre>
<p><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">With this value set, the system will kill any process that tries to take up more resources than you have set as a limit.</span></span></span></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2012/01/ulimit-a.jpg" class="thickbox no_icon" rel="gallery-1954" title="ulimit-a"><img class="aligncenter size-full wp-image-1976" title="ulimit-a" src="http://www.supportsages.com/blog/wp-content/uploads/2012/01/ulimit-a.jpg" alt="" width="621" height="422" /></a></p>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=Chapter+12+All+about+a+process+running+in+linux+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1954" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=Chapter+12+All+about+a+process+running+in+linux+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1954" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2012/01/all-about-a-process-running-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cPanel Website Transfer &#8211; Part 2 &#8211; cPanel to cPanel Migration</title>
		<link>http://www.supportsages.com/blog/2011/08/cpanel-website-transfer-part-2-cpanel-to-cpanel-migration/</link>
		<comments>http://www.supportsages.com/blog/2011/08/cpanel-website-transfer-part-2-cpanel-to-cpanel-migration/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 11:48:54 +0000</pubDate>
		<dc:creator>vince</dc:creator>
				<category><![CDATA[cPanel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=1870</guid>
		<description><![CDATA[<h3><strong><em><span style="color: #ff0000;">Transferring a Website from One cPanel server to another</span></em></strong></h3>
<strong>Skill Level : Beginner</strong>

In this post, I will explain how to transfer a website from one cPanel server to other.

<strong>Pre Requisites</strong>

Server Platform : Linux

User requires     : cPanel and SSH access (root) to at-least the Destination server (where the account is restoring)

<strong>The Process</strong>

From the Target server, Generate a Full cPanel backup of the account using either cPanel or through root shell access.

(i) By cPanel

Login to cPanel. Go to Files -&#62; Backups

<a href="http://www.supportsages.com/blog/wp-content/uploads/2011/06/Files.png"><img class="alignleft size-full wp-image-1875" title="Files" src="http://www.supportsages.com/blog/wp-content/uploads/2011/06/Files.png" alt="" width="329" height="115" /></a>

Click "Download or Generate a Full Website Backup". Choose Backup Destination ...]]></description>
			<content:encoded><![CDATA[<h3><strong><em><span style="color: #ff0000;">Transferring a Website from One cPanel server to another</span></em></strong></h3>
<p><strong>Skill Level : Beginner</strong></p>
<p>In this post, I will explain how to transfer a website from one cPanel server to other.</p>
<p><strong>Pre Requisites</strong></p>
<p>Server Platform : Linux</p>
<p>User requires     : cPanel and SSH access (root) to at-least the Destination server (where the account is restoring)</p>
<p><strong>The Process</strong></p>
<p>From the Target server, Generate a Full cPanel backup of the account using either cPanel or through root shell access.</p>
<p>(i) By cPanel</p>
<p>Login to cPanel. Go to Files -&gt; Backups</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/06/Files.png" class="thickbox no_icon" rel="gallery-1870" title="Files"><img class="alignleft size-full wp-image-1875" title="Files" src="http://www.supportsages.com/blog/wp-content/uploads/2011/06/Files.png" alt="" width="329" height="115" /></a></p>
<p>Click &#8220;Download or Generate a Full Website Backup&#8221;. Choose Backup Destination as &#8220;Home Directory&#8221; (Make sure you&#8217;ve enough Disk Space before you proceed) and a valid E-mail address to notify you once the Backup is generated.</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/06/Full_Backup.png" class="thickbox no_icon" rel="gallery-1870" title="Full_Backup"><img class="alignleft size-full wp-image-1878" title="Full_Backup" src="http://www.supportsages.com/blog/wp-content/uploads/2011/06/Full_Backup.png" alt="" width="580" height="262" /></a></p>
<p>Once the Backup is completed, a mail will arrive on the E-mail you&#8217;ve mentioned above (if specified) and the &#8216;Backups Available for Download&#8217; will be populated with the name of the backup file generated like :</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/06/Backup_Complete.png" class="thickbox no_icon" rel="gallery-1870" title="Backup_Complete"><img class="alignleft size-full wp-image-1879" title="Backup_Complete" src="http://www.supportsages.com/blog/wp-content/uploads/2011/06/Backup_Complete.png" alt="" width="580" height="49" /></a></p>
<p>Do you know why the backup generated is the form tar.gz ? Its because, in the tar format all files are preserved with their appropriate permissions and then its compressed to gz (gzip) for obtaining the least possible file size.</p>
<p>The process in the Target server is finished. Now login as Root in the server which requires the account to be restored. We&#8217;ve to download the backup file generated there to this server. There are number of ways to do this. Some are weird <img src='http://www.supportsages.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Method 1</strong></p>
<p>If you have the cPanel details of that server, you can use it for FTP access. And since the Backup is generated on the Home directory there, its all about downloading the backup.</p>
<p># root@server [/home]# ftp <span style="color: #ff0000;"><strong>oldserver.com</strong></span> or <strong><span style="color: #ff0000;">IP</span></strong></p>
<p>Connected to oldserver.com.<br />
220&#8212;&#8212;&#8212;- Welcome to Pure-FTPd [privsep] [TLS] &#8212;&#8212;&#8212;-<br />
220-You are user number 3 of 50 allowed.<br />
220-Local time is now 17:28. Server port: 21.<br />
220-IPv6 connections are also welcome on this server.<br />
220 You will be disconnected after 15 minutes of inactivity.<br />
Name (oldserver.com:root): <strong><span style="color: #ff0000;">user</span></strong><br />
331 User user OK. Password required<br />
Password:<br />
230 OK. Current restricted directory is /<br />
Remote system type is UNIX.<br />
Using binary mode to transfer files.<br />
ftp&gt; get <span style="color: #ff0000;"><strong>backup-6.2.2011_06-23-57_account.tar.gz</strong></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">This will download the backup. You need root access to restore it. Before you restore you need to check whether there is an account or domain which already exists by the name which you intend to restore.</span></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">cPanel script to check whether the domain/account name exists </span></span></p>
<p><strong># grep account /etc/userdomains</strong></p>
<p><strong>Method 2</strong></p>
<p><strong>Generating a cPanel backup through Remote FTP (Passive Mode transfer)</strong></p>
<p>It is possible to generate a Remote backup of the account in a server, where the backup has to be restored. Go to cPanel -&gt; Backups -&gt; Download or Generate a Full website backup. Select the Backup Destination as Remote FTP Server (passive mode transfer). Follow the screenshot :</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/07/remote_ftp.png" class="thickbox no_icon" rel="gallery-1870" title="remote_ftp"><img class="alignleft size-full wp-image-1900" title="remote_ftp" src="http://www.supportsages.com/blog/wp-content/uploads/2011/07/remote_ftp.png" alt="" width="759" height="544" /></a></p>
<p>cPanel script to restore the account</p>
<p># nice -n 19 /scripts/restorepkg &#8211;skipres &lt;username&gt;</p>
<p>For the script to run, the backup should be in any of the following locations in the server :  /, /home, /home2, /home3, /misc, /net, /root, /usr, /usr/home, /var/lib/nfs/rpc_pipefs, /var/tmp, /web</p>
<p>This feature will restore full backups, cPanel backups and cPanel move files in one of the following formats:</p>
<p>cpmove-{USER}<br />
cpmove-{USER}.tar<br />
cpmove-{USER}.tar.gz<br />
USER.tar<br />
USER.tar.gz<br />
backup-{BACKUP-DATE_TIME}_{USER}.tar<br />
backup-{BACKUP-DATE_TIME}_{USER}.tar.gz</p>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=cPanel+Website+Transfer+-+Part+2+-+cPanel+to+cPanel+Migration+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1870" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=cPanel+Website+Transfer+-+Part+2+-+cPanel+to+cPanel+Migration+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1870" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2011/08/cpanel-website-transfer-part-2-cpanel-to-cpanel-migration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSL Installation in a cPanel based server</title>
		<link>http://www.supportsages.com/blog/2011/08/ssl-installation-in-a-cpanel-based-server/</link>
		<comments>http://www.supportsages.com/blog/2011/08/ssl-installation-in-a-cpanel-based-server/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 10:14:00 +0000</pubDate>
		<dc:creator>vince</dc:creator>
				<category><![CDATA[cPanel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=1782</guid>
		<description><![CDATA[<span style="color: #ff0000;"><strong>What is SSL</strong></span>

SSL (Secure Sockets Layer) is a cryptographic protocol which ensure the security of communication over the Internet. SSL encrypt the segments of network connections above the Transport Layer, using symmetric cryptography for privacy and a keyed message authentication code for message reliability.

<span style="color: #ff0000;"><strong>How SSL works</strong></span>

Web servers and Web browsers rely on the SSL protocol to create a unique encrypted channel for private communications over the Internet. The SSL Certificate consists of a public key and a private key. The public key is used to encrypt information and the private key is used to decrypt it. ...]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;"><strong>What is SSL</strong></span></p>
<p>SSL (Secure Sockets Layer) is a cryptographic protocol which ensure the security of communication over the Internet. SSL encrypt the segments of network connections above the Transport Layer, using symmetric cryptography for privacy and a keyed message authentication code for message reliability.</p>
<p><span style="color: #ff0000;"><strong>How SSL works</strong></span></p>
<p>Web servers and Web browsers rely on the SSL protocol to create a unique encrypted channel for private communications over the Internet. The SSL Certificate consists of a public key and a private key. The public key is used to encrypt information and the private key is used to decrypt it. When a Web browser points to a domain which is secured by SSL, a level of encryption is established based on the type of SSL Certificate as well as the client Web browser, operating system and host server’s capabilities. This is why SSL certificates feature a different range of encryption levels.</p>
<p><span style="color: #ff0000;"><strong>Obtaining an SSL Certificate</strong></span></p>
<p>Domain example.com needs an SSL Certificate. The following steps are involved in it :</p>
<p>a) Example.com generates a CSR (Certificate Signing Request) and during this process, a private key is generated.<br />
b) With this CSR, Example.com goes to a trusted, third party Certificate Authority like Verisign. They take the Certificate Signing Request and validates example.com. The Certificate Authority validates example.com.<br />
c) When the validation process is complete, the third party Certificate Authority gives a new public key (certificate) encrypted with their private key.<br />
d) Example.com installs the new certificate and gets secured.</p>
<p><span style="color: #ff0000;"><strong>Installing SSL</strong></span></p>
<p>(i) Through cPanel/WHM<br />
Its quite easy to install SSL through cPanel/WHM interface.</p>
<p><strong>Generating CSR</strong></p>
<p>Under Security tab, click SSL/TLS Manager.</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/03/security_cpanel.png" class="thickbox no_icon" rel="gallery-1782" title="security_cpanel"><img class="alignnone size-full wp-image-1786" title="security_cpanel" src="http://www.supportsages.com/blog/wp-content/uploads/2011/03/security_cpanel.png" alt="" width="519" height="117" /></a></p>
<p>Generate the Private Keys first by accessing the option <strong>Generate, view, upload or delete your private keys</strong></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/03/ssltls1.png" class="thickbox no_icon" rel="gallery-1782" title="ssltls"><img class="alignnone size-full wp-image-1789" title="ssltls" src="http://www.supportsages.com/blog/wp-content/uploads/2011/03/ssltls1.png" alt="" width="320" height="206" /></a></p>
<p>Access the option <strong>Generate, view, or delete SSL certificate signing requests</strong>. Fill in the forms like Domain Name, E-mail Address, Country etc.</p>
<p>You will obtain the CSR. Contact the Certificate provider with this information. The Certificate Authority will then provide the Certificate (CRT). Finally you will have the following files associated with SSL :</p>
<p><em><strong>CSR in the format domain.com.csr or domain_com.csr</strong></em></p>
<p><em><strong>CA bundle, which have the Public key of the Certificate Authority in the format domain.com.cabundle or domain_com.ca-bundle</strong></em></p>
<p><em><strong>CRT, the certificate in the format domain.com.crt or domain_com.crt</strong></em></p>
<p><em><strong>Private key in the format domain.com.key or domain_com.key </strong></em></p>
<p><span style="color: #ff0000;"><strong>Method 1 : Installing from cPanel</strong></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">1. Go to </span></span><strong>SSL/TLS Manager</strong>.<br />
2. Click <strong>Generate, view, upload, or delete your private keys</strong>.<br />
3. Under the <strong>Upload a New Certificate section</strong>, click on the <strong>Browse </strong>button (next to Choose a .crt file option) and find the Domain Certificate file  (example.crt) that you obtained from the SSL vendor. Alternatively you can paste the Certificate contents on the section <strong>Paste the crt  below</strong>. Make sure to include the BEGIN and  END tags, while copying your certificate. Click the Upload button.<br />
4. Go Back and click Return to <strong>SSL Manager</strong> at the bottom of the page.<br />
5. Click on <strong>Setup a SSL certificate to work with your site</strong>. If this option is not available, your web host may have disabled it. You will need to contact them for further support.<br />
6. Now, select the domain you are using from the Domain drop down menu. It will attempt to fetch the SSL Certificate and the private key. If this doesn&#8217;t work, you may need to contact your web host.<br />
7. In the box labeled CA Bundle paste the contents of the Intermediate certificate (DigiCertCA.crt).<br />
8. Click Install Certificate. Your SSL certificate should now be installed, and the website configured to accept secure connections. You or your web host may need to restart Apache before it will work.</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/08/ssl-cpanel-install-1.png" class="thickbox no_icon" rel="gallery-1782" title="ssl-cpanel-install-1"><img class="alignleft size-full wp-image-1917" title="ssl-cpanel-install-1" src="http://www.supportsages.com/blog/wp-content/uploads/2011/08/ssl-cpanel-install-1.png" alt="" width="523" height="420" /></a></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/08/ssl-cpanel-install-2.png" class="thickbox no_icon" rel="gallery-1782" title="ssl-cpanel-install-2"><img class="alignleft size-full wp-image-1918" title="ssl-cpanel-install-2" src="http://www.supportsages.com/blog/wp-content/uploads/2011/08/ssl-cpanel-install-2.png" alt="" width="497" height="667" /></a></p>
<p><span style="color: #ff0000;"><strong>Method 2 : Installing from WHM</strong></span></p>
<p><strong> </strong><span style="color: #000000;">You can install SSL certificate from WHM also. Its quite simple when compared to the installation through cPanel. All you need is the root access to WHM. Once you login to the WHM, search for the option </span><strong>Install a SSL Certificate and Setup the Domain. </strong></p>
<p>You&#8217;ll find three boxes. Paste the CRT file contents in the first box. It will automatically fetch the Key and CA Bundle (In most cases, CA bundle needs to be fetched manually). Finally click Submit once all the fields are populated. You&#8217;ll see a message that indicates the installation is successful</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/08/whm1.png" class="thickbox no_icon" rel="gallery-1782" title="whm1"><img class="alignleft size-full wp-image-1923" title="whm1" src="http://www.supportsages.com/blog/wp-content/uploads/2011/08/whm1.png" alt="" width="195" height="280" /></a></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/08/whm2.png" class="thickbox no_icon" rel="gallery-1782" title="whm2"><img class="alignleft size-full wp-image-1924" title="whm2" src="http://www.supportsages.com/blog/wp-content/uploads/2011/08/whm2.png" alt="" width="573" height="471" /></a></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/08/whm3.png" class="thickbox no_icon" rel="gallery-1782" title="whm3"><img class="alignleft size-full wp-image-1925" title="whm3" src="http://www.supportsages.com/blog/wp-content/uploads/2011/08/whm3.png" alt="" width="584" height="387" /></a><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/08/whm4.png" class="thickbox no_icon" rel="gallery-1782" title="whm4"><img class="size-full wp-image-1926 alignleft" title="whm4" src="http://www.supportsages.com/blog/wp-content/uploads/2011/08/whm4.png" alt="" width="554" height="356" /></a></p>
<p><span style="color: #ff0000;"><strong>Method 3 : Manual Installation</strong></span></p>
<p>You need the Server Root shell access for this. Go to the Apache configuration file in the server, in the cPanel case its /usr/local/apache/conf/httpd.conf. Locate the VirtualHost entry configured for SSL. Configure it like :</p>
<pre class="brush: bash; title: ; notranslate">
&lt;VirtualHost xxx.xxx.x.xx:443&gt;
 ServerName example.com
 ServerAlias www.example.com
 DocumentRoot /home/example/public_html
 SSLEngine on
 SSLCertificateFile /usr/share/ssl/certs/example.com.crt
 SSLCertificateKeyFile /usr/share/ssl/private/example.com.key
 SSLCACertificateFile /usr/share/ssl/certs/example.com.cabundle
&lt;/VirtualHost&gt;
</pre>
<p>where <strong>SSLCertificateFile </strong>is the SSL certificate file path, <strong>SSLCertificateKeyFile </strong>is the Key file path, <strong>SSLCACertificateFile </strong>is the path to the Intermediate file. Make sure you&#8217;ve the files in the specified path (It may vary on different scenarios). Restart the Web server and you&#8217;re done.</p>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=SSL+Installation+in+a+cPanel+based+server+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1782" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=SSL+Installation+in+a+cPanel+based+server+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1782" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2011/08/ssl-installation-in-a-cpanel-based-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cPanel Website Transfer &#8211; Part 1 &#8211; Changing an Add-on Domain to a Primary Domain</title>
		<link>http://www.supportsages.com/blog/2011/07/cpanel-website-transfer-part-1-changing-an-add-on-domain-to-a-primary-domain/</link>
		<comments>http://www.supportsages.com/blog/2011/07/cpanel-website-transfer-part-1-changing-an-add-on-domain-to-a-primary-domain/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 12:52:52 +0000</pubDate>
		<dc:creator>vince</dc:creator>
				<category><![CDATA[cPanel]]></category>
		<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[restore]]></category>
		<category><![CDATA[transfer]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=728</guid>
		<description><![CDATA[For Beginners, Learn how to transfer and restore a website in a Linux cPanel envrioment]]></description>
			<content:encoded><![CDATA[<h3><span style="color: #ff0000;"><strong><em><strong><em>Converting an Add-on Domain to a Primary Domain</em></strong></em></strong></span></h3>
<p><strong>Skill Level : Beginner</strong></p>
<p>In this post, I will explain how to convert an add-on domain to a primary domain. Considering a complex case, lets consider the primary domain should be a different one from the one that holds the Add-on domain.</p>
<p><strong>Pre Requisites</strong></p>
<p>Server Platform : Linux</p>
<p>User requires     : cPanel and SSH access (root)</p>
<p>This is a Site transfer. Also both the sites I&#8217;ve mentioned here is on same server.</p>
<p><strong>Case</strong></p>
<p>The Add-on Domain under a website has to be converted as its Primary Domain. If you have a Full backup, its another case. I&#8217;ll explain it in another post.</p>
<p><strong>Solution</strong></p>
<p>Lets consider the Add-on Domain is addon.com under the user admin and the document root of the add-on domain is :</p>
<p>/home/admin/public_html/addon</p>
<p>Now it should be transferred as the Primary Domain</p>
<p>* Using WHM Create a New account primary.com, the document root is then say /home/primary<br />
We&#8217;ve to transfer the whole data from /home/admin/public_html/addon.com to /home/primary/public_html first.</p>
<p>* The Steps will be :</p>
<p>root@server [/home/admin/public_html/addon]# cp -r ./* /home/primary/public_html</p>
<p>This will recursively copy everything inside the PWD to the specified location<br />
<span id="more-728"></span></p>
<p>Don&#8217;t forget to copy .htaccess too</p>
<p>root@server [/home/admin/public_html/addon]# cp .htaccess /home/primary/public_html</p>
<p>* Thats it, the contents are moved, but there is a database too which has to be moved eventually.<br />
* I&#8217;ll site some type of websites like CMS and Blog :</p>
<p>For a Magento website, the database configuration is specified inside the local.xml file which is placed inside the /app/etc directory inside a domain. For example</p>
<p>root@server [/home/admin/public_html/addon]# cd /app/etc<br />
root@server [/home/admin/public_html/addon/app/etc]# cat local.xml</p>
<p>* Watch for these lines in the local.xml file</p>
<p>&lt;username&gt;&lt;![CDATA[admin_user]]&gt;&lt;/username&gt;<br />
&lt;password&gt;&lt;![CDATA[password]]&gt;&lt;/password&gt;<br />
&lt;dbname&gt;&lt;![CDATA[admin_db]]&gt;&lt;/dbname&gt;</p>
<p><![CDATA[admin_user]]&gt;</username></p>
<password><! [CDATA[password]]-->                     <!--[CDATA[admin_user]]&gt;</p>
<p>* From this the DB Name, DB Username and Password can be fetched.</p>
<p>DB Name            :    admin_db<br />
DB Username    :    admin_user<br />
Password       :    password</p>
<p><strong>Other DB Configuration Files</strong></p>
<p>For a WordPress website, the configuration file will be the wp-config.php. Check these lines for the Database configuration details :</p>
<p>// ** MySQL settings &#8211; You can get this info from your web host ** //<br />
/** The name of the database for WordPress */<br />
define(&#8216;DB_NAME&#8217;, &#8216;admin_db&#8217;);</p>
<p>/** MySQL database username */<br />
define(&#8216;DB_USER&#8217;, &#8216;admin_user&#8217;);</p>
<p>/** MySQL database password */<br />
define(&#8216;DB_PASSWORD&#8217;, &#8216;password&#8217;);</p>
<p>/** MySQL hostname */<br />
define(&#8216;DB_HOST&#8217;, &#8216;localhost&#8217;);</p>
<p>For a Joomla website it is the configuration.php where the database details would be defined.</p>
<p>* Access the cPanel of the new primary domain primary.com. Create a new MySQL Database from Databases -&gt; MySQL option, along with a new MySQL user. Make sure you are providing    exact names as in the local.xml file of the addon.com. Next add the user to the database. So the corresponding database credentials at primary.com will be :</p>
<p>DB Name           :    primary_db<br />
DB Username    :    primary_user<br />
Password                 :     password</p>
<p>Screen-shots of Creating a new database and database user :</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/05/1.png" class="thickbox no_icon" rel="gallery-728" title="1"><img class="alignnone size-medium wp-image-1860" title="1" src="http://www.supportsages.com/blog/wp-content/uploads/2011/05/1-300x68.png" alt="" width="300" height="68" /></a></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/05/2.png" class="thickbox no_icon" rel="gallery-728" title="2"><img class="alignnone size-medium wp-image-1861" title="2" src="http://www.supportsages.com/blog/wp-content/uploads/2011/05/2-300x79.png" alt="" width="300" height="79" /></a></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/05/3.png" class="thickbox no_icon" rel="gallery-728" title="3"><img class="alignnone size-medium wp-image-1862" title="3" src="http://www.supportsages.com/blog/wp-content/uploads/2011/05/3-300x140.png" alt="" width="300" height="140" /></a></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/05/5.png" class="thickbox no_icon" rel="gallery-728" title="5"><img class="alignnone size-full wp-image-1863" title="5" src="http://www.supportsages.com/blog/wp-content/uploads/2011/05/5.png" alt="" width="276" height="118" /></a></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/05/6.png" class="thickbox no_icon" rel="gallery-728" title="6"><img class="alignnone size-medium wp-image-1864" title="6" src="http://www.supportsages.com/blog/wp-content/uploads/2011/05/6-300x201.png" alt="" width="300" height="201" /></a></p>
<p><strong>Creating DB through Shell</strong></p>
<p>Access MySQL prompt :</p>
<p>$ mysql //Login as Root</p>
<p>mysql&gt; use mysql; //Use MySQL</p>
<p>﻿﻿﻿﻿﻿﻿mysql&gt; create database [﻿primary_db]; //Create a Database</p>
<p>mysql&gt; INSERT INTO primary_user (Host,User,Password) VALUES(&#8216;host&#8217;,'primary_user&#8217;,PASSWORD(&#8216;password&#8217;)); //Insert User</p>
<p>mysql&gt; grant all privileges on primary_db.sql to primary_user@localhost; //Granting all Privileges to user primary_user on the database</p>
<p>Perform Dump :</p>
<p>root@server [/home/primary]# mysqldump dbname &gt; dbname.sql   (Here mysqldump admin_db &gt; admin_db.sql)</p>
<p>* Enter the mysql terminal through the command mysql</p>
<p>mysql &gt; use newdatabasename;          (Here mysql &gt; use primary_db;)<br />
mysql &gt; source olddatabasename.sql;      (Here mysql &gt; source admin_db.sql;)</p>
<p>* For a normal website, you may backup the database by checking the config files and restore it. Use cPanel for that.</p>
<p>* Guess what, You&#8217;re done, the restoration is complete now. Now the primary.com should be working like addon.com.</p>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=cPanel+Website+Transfer+-+Part+1+-+Changing+an+Add-on+Domain+to+a+Primary+Domain+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F728" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=cPanel+Website+Transfer+-+Part+1+-+Changing+an+Add-on+Domain+to+a+Primary+Domain+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F728" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2011/07/cpanel-website-transfer-part-1-changing-an-add-on-domain-to-a-primary-domain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Worried about email migrations and mail syncing &#8211; get getmail for the rescue</title>
		<link>http://www.supportsages.com/blog/2011/06/worried-about-email-migrations-and-mail-syncing-get-getmail-for-the-rescue/</link>
		<comments>http://www.supportsages.com/blog/2011/06/worried-about-email-migrations-and-mail-syncing-get-getmail-for-the-rescue/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 15:14:39 +0000</pubDate>
		<dc:creator>arnold</dc:creator>
				<category><![CDATA[cPanel]]></category>
		<category><![CDATA[DirectAdmin]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[email migrations]]></category>
		<category><![CDATA[email transfer]]></category>
		<category><![CDATA[imapsync]]></category>
		<category><![CDATA[mail syncing]]></category>
		<category><![CDATA[mail transfer]]></category>
		<category><![CDATA[migrate my email]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=1887</guid>
		<description><![CDATA[Most of the hosting providers offer free server migration. The free website migration started as early as 2005, in the industry. But only a few providers offer the email migration for a website transfer involving different control panels. So using getmail is the easiest way to transfer emails. All we need is to create the email account in the new server and configure the getmail to transfer the emails.

Download getmail at http://pyropus.ca/software/getmail/old-versions/getmail-4.20.3.tar.gz

[bash]

wget http://pyropus.ca/software/getmail/old-versions/getmail-4.20.3.tar.gz
tar xzf getmail-4.20.3.tar.gz
cd getmail*
python setup.py install

[/bash]

Now you have to create a getmailrc , the getmail configuration file inside the home folder of the user. getmailrc need not be ...]]></description>
			<content:encoded><![CDATA[<p>Most of the hosting providers offer free server migration. The free website migration started as early as 2005, in the industry. But only a few providers offer the email migration for a website transfer involving different control panels. So using getmail is the easiest way to transfer emails. All we need is to create the email account in the new server and configure the getmail to transfer the emails.</p>
<p>Download getmail at http://pyropus.ca/software/getmail/old-versions/getmail-4.20.3.tar.gz</p>
<pre class="brush: bash; title: ; notranslate">

wget http://pyropus.ca/software/getmail/old-versions/getmail-4.20.3.tar.gz
tar xzf getmail-4.20.3.tar.gz
cd getmail*
python setup.py install
</pre>
<p>Now you have to create a getmailrc , the getmail configuration file inside the home folder of the user. getmailrc need not be inside the home directory. You have to create the folder .getmail where getmail keeps a log of the emails retrieved based on each configuration file you may have.You can have multiple destination and retriever sections in one single getmailrc as well.</p>
<p>I must say getmail is so much flexible and rightly coded when the mailsync or imapsync didn&#8217;t do their job right or up to the mark. And is an excellent replacement for fetchmail. It supports POP, POP3S, IMAP4 and IMAPS, and also can store the mails retrieved in mbox or maildir format at the destination.</p>
<p>An extremely simple getmailrc file will look like this</p>
<pre class="brush: bash; title: ; notranslate">
[retriever]
type = SimpleIMAPRetriever
server = mail.domain.com
username = direct@domain.com
password = direct

[destination]
type = Maildir
path = /home/cpusername/mail/.direct@domain_com/
</pre>
<p>The file format should be pretty self-explanatory. You’re telling getmail to fetch your email from server, mail.domain.com by logging to it using the mentioned username and password. The destination section mentions where to store the retrieved email and in which format (Maildir or mbox or mboxrd). Make sure that the cur, new and tmp are there inside those folder though. However getmail may create those folders automatically though.</p>
<p>Finally to get this going, just run &#8220;getmail &#8211;rcfile getmailrc&#8221;</p>
<p>Once you run it, assuming that the getmailrc is properly configured, you will be welcomed by a below output.</p>
<pre class="brush: bash; title: ; notranslate">
getmail version 4.20.3
Copyright (C) 1998-2009 Charles Cazabon.  Licensed under the GNU GPL version 2.
SimpleIMAPRetriever:direct@domain.com@mail.domain.com:143:
 msg    1/3983 (299328 bytes) delivered
 msg    2/3983 (2815 bytes) delivered
</pre>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=Worried+about+email+migrations+and+mail+syncing+-+get+getmail+for+the+rescue+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1887" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=Worried+about+email+migrations+and+mail+syncing+-+get+getmail+for+the+rescue+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1887" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2011/06/worried-about-email-migrations-and-mail-syncing-get-getmail-for-the-rescue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install 32 bit and 64 bit applications on 64 bit Ubuntu OS</title>
		<link>http://www.supportsages.com/blog/2011/05/how-to-install-32-bit-and-64-bit-applications-on-64-bit-ubuntu-os/</link>
		<comments>http://www.supportsages.com/blog/2011/05/how-to-install-32-bit-and-64-bit-applications-on-64-bit-ubuntu-os/#comments</comments>
		<pubDate>Thu, 26 May 2011 17:24:30 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[getlibs]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=1853</guid>
		<description><![CDATA[Earlier, with Drapper Drake , you only had to install ia32libs. But after that, may be they decided not to release for future versions, no more release. Hackers always find a way round to get their thing done and that exactly what happened with this as well. A bash file was written and released to the public available at http://frozenfox.freehostia.com/cappy/

I recently had to use this frequently and thought about mentioning it. In last two days, I had two such requirements as well. Here in India, Tata Docomo's USB installation binary, will work only on i386 linux boxes. I would admit ...]]></description>
			<content:encoded><![CDATA[<p>Earlier, with Drapper Drake , you only had to install ia32libs. But after that, may be they decided not to release for future versions, no more release. Hackers always find a way round to get their thing done and that exactly what happened with this as well. A bash file was written and released to the public available at http://frozenfox.freehostia.com/cappy/</p>
<p>I recently had to use this frequently and thought about mentioning it. In last two days, I had two such requirements as well. Here in India, Tata Docomo&#8217;s USB installation binary, will work only on i386 linux boxes. I would admit that that itself is an achievement <img src='http://www.supportsages.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  But I had to get it working on a x64 architecture as well. And it was complaining about libqt and a few other 32 bit packages. dkpg&#8217;s &#8211;force-architecture option was also not working because of dependency issue.</p>
<p>This also helped me install a Task Management Software as well, http://codea-dev.com/gtd/download/linux/</p>
<p>Below text is copied from Ubuntu Forum&#8217;s. Author&#8217;s original post can be found at http://ubuntuforums.org/showthread.php?t=474790</p>
<p><span style="font-size: small;"><strong>getlibs works on:</strong></span></p>
<ul>
<li>All Ubuntu and Debian systems</li>
<li>Debian or Ubuntu based distributions (best to use the package name)</li>
</ul>
<p>Tip: To install a 32-bit debian package for a program (not a library!) use</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo dpkg -i --force-all package_name.deb</pre>
</div>
<p><span style="font-size: small;"><strong>Usage Examples:</strong></span></p>
<p>getlibs on a program to download all missing libraries:</p>
<div>
<div>Code:</div>
<pre dir="ltr">getlibs /usr/bin/skype</pre>
</div>
<p>&#8212;&#8211;</p>
<p>Use getlibs to install a 32-bit library using the library name:</p>
<div>
<div>Code:</div>
<pre dir="ltr">getlibs -l libogg.so.0 libSDL-1.2.so.0</pre>
</div>
<p>&#8212;&#8211;</p>
<p>Use getlibs to install a 32-bit library using the package name:</p>
<div>
<div>Code:</div>
<pre dir="ltr">getlibs -p libqt4-core libqt4-gui</pre>
</div>
<p>&#8212;&#8211;</p>
<p>Install a 32-bit library file (.deb):</p>
<div>
<div>Code:</div>
<pre dir="ltr">getlibs -i ~/i386_library_1.deb</pre>
</div>
<p>&#8212;&#8211;</p>
<p>Download and install a 32-bit library file (.deb):</p>
<div>
<div>Code:</div>
<pre dir="ltr">getlibs -w http://mirrors.kernel.org/ubuntu/pool/main/s/sdl-image1.2/libsdl-image1.2_1.2.5-3_i386.deb</pre>
</div>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=How+to+install+32+bit+and+64+bit+applications+on+64+bit+Ubuntu+OS+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1853" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=How+to+install+32+bit+and+64+bit+applications+on+64+bit+Ubuntu+OS+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1853" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2011/05/how-to-install-32-bit-and-64-bit-applications-on-64-bit-ubuntu-os/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple backup script for remotely backing up databases</title>
		<link>http://www.supportsages.com/blog/2011/05/simple-backup-script-for-remotely-backing-up-databases/</link>
		<comments>http://www.supportsages.com/blog/2011/05/simple-backup-script-for-remotely-backing-up-databases/#comments</comments>
		<pubDate>Wed, 25 May 2011 18:23:38 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[cpanel mysql backup]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[remote mysql backup]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=1847</guid>
		<description><![CDATA[This backup script is actually a small modification of another backup script available in Google. I am not able to get that URL to mark/link reference. Only modification I added is a four liner to remove a week old backup automatically. You may also see http://www.supportsages.com/blog/2011/05/applying-wildcards-in-grant-option-of-mysql/ as well. Indenting in python is lost, will fix tomorrow :)

[code lang="python"]

#!/usr/bin/env python
import ConfigParser
import os
import time

# Variable Definition
username = 'cpdbbackups'
password = 'p@ssw0Rd'
hostname = 're.mo.te.ip
backupfolder = '/home/dbbackups/servername'

filestamp = time.strftime('%Y-%m-%d-%H')
deletetime = time.time() - 7 * 86400

# Delete old files

for backup_file in os.listdir (backupfolder):
 full_file_path = os.path.join(backupfolder, backup_file)
 if os.path.getmtime(full_file_path) &#60; deletetime:
 os.unlink(full_file_path)

# Get a list of ...]]></description>
			<content:encoded><![CDATA[<p>This backup script is actually a small modification of another backup script available in Google. I am not able to get that URL to mark/link reference. Only modification I added is a four liner to remove a week old backup automatically. You may also see http://www.supportsages.com/blog/2011/05/applying-wildcards-in-grant-option-of-mysql/ as well. Indenting in python is lost, will fix tomorrow <img src='http://www.supportsages.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre class="brush: python; title: ; notranslate">

#!/usr/bin/env python
import ConfigParser
import os
import time

# Variable Definition
username = 'cpdbbackups'
password = 'p@ssw0Rd'
hostname = 're.mo.te.ip
backupfolder = '/home/dbbackups/servername'

filestamp = time.strftime('%Y-%m-%d-%H')
deletetime = time.time() - 7 * 86400

# Delete old files

for backup_file in os.listdir (backupfolder):
 full_file_path = os.path.join(backupfolder, backup_file)
 if os.path.getmtime(full_file_path) &lt; deletetime:
 os.unlink(full_file_path)

# Get a list of databases with :
database_list_command=&quot;mysql -u%s -p%s -h %s --silent -N -e 'show databases'&quot; % (username, password, hostname)
for database in os.popen(database_list_command).readlines():
 database = database.strip()

 if database == 'information_schema':
 continue
 filename = &quot;%s/%s-%s.sql&quot; % (backupfolder, database, filestamp)
 os.popen(&quot;mysqldump -u%s -p%s -h %s -e --opt -c %s | gzip -c &gt; %s.gz&quot; % (username, password, hostname, database, filename))
</pre>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=Simple+backup+script+for+remotely+backing+up+databases+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1847" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=Simple+backup+script+for+remotely+backing+up+databases+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1847" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2011/05/simple-backup-script-for-remotely-backing-up-databases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Applying wildcards in GRANT option of MySQL</title>
		<link>http://www.supportsages.com/blog/2011/05/applying-wildcards-in-grant-option-of-mysql/</link>
		<comments>http://www.supportsages.com/blog/2011/05/applying-wildcards-in-grant-option-of-mysql/#comments</comments>
		<pubDate>Wed, 25 May 2011 10:27:19 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[cPanel]]></category>
		<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[cPanel server backup]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysqldump]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=1841</guid>
		<description><![CDATA[We had this particular requirement of creating a database user to be used to backup only the cPanel databases. Only recently the database mapping has been introduced by cPanel which allows the clients to create databases without the _ . However on all our client servers, we insist to have the old style with every database has Prefixing On.

Creating the database user to backup only the cPanel databases, means matching the databases with an underscore (_) in its name and that resulted in this particular SQL command to be executed as root user.

[bash]GRANT ALL PRIVILEGES ON `%\_%`.* TO `cpdbbackups`@`re.mo.te.ip` IDENTIFIED ...]]></description>
			<content:encoded><![CDATA[<p>We had this particular requirement of creating a database user to be used to backup only the cPanel databases. Only recently the database mapping has been introduced by cPanel which allows the clients to create databases without the _ . However on all our client servers, we insist to have the old style with every database has Prefixing On.</p>
<p>Creating the database user to backup only the cPanel databases, means matching the databases with an underscore (_) in its name and that resulted in this particular SQL command to be executed as root user.</p>
<pre class="brush: bash; title: ; notranslate">GRANT ALL PRIVILEGES ON `%\_%`.* TO `cpdbbackups`@`re.mo.te.ip` IDENTIFIED BY 'p@ssw0Rd' WITH GRANT OPTION;</pre>
<p>Read more about the cPanel&#8217;s DB mapping at http://www.cpanel.net/blog/integration/2010/05/more-details-about-db-mapping.html</p>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=Applying+wildcards+in+GRANT+option+of+MySQL+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1841" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=Applying+wildcards+in+GRANT+option+of+MySQL+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1841" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2011/05/applying-wildcards-in-grant-option-of-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>History of Domain Names</title>
		<link>http://www.supportsages.com/blog/2011/05/history-of-domain-names/</link>
		<comments>http://www.supportsages.com/blog/2011/05/history-of-domain-names/#comments</comments>
		<pubDate>Sun, 22 May 2011 13:23:29 +0000</pubDate>
		<dc:creator>annette</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=1839</guid>
		<description><![CDATA[What is a domain name? A domain name is a unique name, kind of like an  e-mail address is unique, which is registered in a database called WHOIS  through an organization called Network Solutions, Inc. (NSI). The  domain name corresponds to a unique set of numbers called an IP  (Internet Protocol) address. The reason we use domain names instead of  IP addresses is that they are closer to our language. It would be  difficult to market a site like this: "Go to 64.233.167.99 or  216.109.112.135 to search the internet!" A much easier way ...]]></description>
			<content:encoded><![CDATA[<p>What is a domain name? A domain name is a unique name, kind of like an  e-mail address is unique, which is registered in a database called WHOIS  through an organization called Network Solutions, Inc. (NSI). The  domain name corresponds to a unique set of numbers called an IP  (Internet Protocol) address. The reason we use domain names instead of  IP addresses is that they are closer to our language. It would be  difficult to market a site like this: &#8220;Go to 64.233.167.99 or  216.109.112.135 to search the internet!&#8221; A much easier way to do this is  to say &#8220;Go to www.Google.com or www.yahoo.com to search the internet!&#8221;  (Both Google and Yahoo are trade marked by Google, Inc., and Yahoo,  Inc., respectively).</p>
<p>A domain name points to a computer called a &#8220;name server&#8221;. The name  server knows that your domain name corresponds to your web hosting  server&#8217;s IP address and it routes the person who typed in your domain  name to your web hosting server &#8211; to your web site. That is how people  anywhere in the world can see your web site by typing your domain name.</p>
<p>In 1992, the National Science Foundation granted an exclusive contract  to NSI to be the sole registrar of top level domain names. NSI also had a  cooperative agreement with United States Department of Commerce  (&#8220;DoC&#8221;). With no competition, consumers were at the mercy of NSI.</p>
<p>In 1998, NSI and the DoC amended their cooperative agreement to allow  for competing registrars. NSI was forced to provide domain name  registration to the competing registrars at wholesale prices, rather  than the standard $34.99 annual fee. NSI still charges $34.99 per year.</p>
<p>In late 1998, the DoC assigned the responsibility of overseeing the  transition to a competitive market for domain names and accreditation of  new registrars to a new organization called the Internet Corporation  for Assigned Names and Numbers (ICANN).</p>
<p>In 1999, ICANN began taking applications from companies who wanted to  become registrars &#8211; and then capitalism took over: companies had to  compete for business. Prices came down and service improved, however  some are better than others. For a more detailed history of this  transition, visit www.icann.org/registrars/accreditation-history.htm.</p>
<p>Even with the positive effects of competition in the domain name  marketplace, the process of internet domain name registration remains a  mystery for many.</p>
<p>There are a lot of companies that want to charge you hundreds of dollars  to do the simple task of domain name registration for you. There are  some registration companies who will charge you $35 just to register a  domain. And there are web site consultants who charge over $100 to do  the work for you. But you can do it yourself in about 15 minutes and it  can cost as little as $1.99 for a year. If you do some research, learn a  little and work smart, you can save yourself some money &#8211; and some  headaches.</p>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=History+of+Domain+Names+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1839" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=History+of+Domain+Names+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1839" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2011/05/history-of-domain-names/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Joomla in IIS 7 : SEO Friendly URLs not working</title>
		<link>http://www.supportsages.com/blog/2011/04/joomla-in-iis-7-seo-friendly-urls-not-working/</link>
		<comments>http://www.supportsages.com/blog/2011/04/joomla-in-iis-7-seo-friendly-urls-not-working/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 18:34:44 +0000</pubDate>
		<dc:creator>vince</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[seo friendly urls]]></category>
		<category><![CDATA[url rewrite]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=1796</guid>
		<description><![CDATA[This post is about how to configure Joomla in IIS]]></description>
			<content:encoded><![CDATA[<p><strong>Scenario</strong></p>
<p>A Joomla website hosted in Linux server is migrated to Windows. Several compatibility issues will be reported. The rules in .htaccess file will not work in Windows Servers which will cause malfunctioning of the website. Here are the steps on how to deal with these issues.</p>
<h3><strong>Solution</strong></h3>
<p>For this to work in IIS, a web.config file should be created and the corresponding rules in .htaccess should be imported to the same file. Here is a sample web.config file. Copy the entire content.</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;configuration&gt;
 &lt;system.webServer&gt;
 &lt;rewrite&gt;
 &lt;rules&gt;
 &lt;rule name="Security Rule" stopProcessing="true"&gt;
 &lt;match url="^(.*)$" ignoreCase="false" /&gt;
 &lt;conditions logicalGrouping="MatchAny"&gt;
 &lt;add input="{QUERY_STRING}" pattern="mosConfig_[a-zA-Z_]{1,21}(=|\%3D)" ignoreCase="false" /&gt;
 &lt;add input="{QUERY_STRING}" pattern="base64_encode.*\(.*\)" ignoreCase="false" /&gt;
 &lt;add input="{QUERY_STRING}" pattern="(\&amp;lt;|%3C).*script.*(\&gt;|%3E)" /&gt;
 &lt;add input="{QUERY_STRING}" pattern="GLOBALS(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" /&gt;
 &lt;add input="{QUERY_STRING}" pattern="_REQUEST(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" /&gt;
 &lt;/conditions&gt;
 &lt;action type="CustomResponse" url="index.php" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /&gt;
 &lt;/rule&gt;
 &lt;rule name="SEO Rule"&gt;
 &lt;match url="(.*)" ignoreCase="false" /&gt;
 &lt;conditions logicalGrouping="MatchAll"&gt;
 &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" /&gt;
 &lt;add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" pattern="" ignoreCase="false" /&gt;
 &lt;add input="{URL}" negate="true" pattern="^/index.php" ignoreCase="false" /&gt;
 &lt;add input="{URL}" pattern="(/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$" /&gt;
 &lt;/conditions&gt;
 &lt;action type="Rewrite" url="index.php" /&gt;
 &lt;/rule&gt;
 &lt;/rules&gt;
 &lt;/rewrite&gt;
 &lt;/system.webServer&gt;
&lt;/configuration&gt;</pre>
<p>So, the file web.config is ready. Now the rules in .htaccess has to be converted in accordance with IIS. In IIS6, you can make use of the ISAPI_REWRITE module. Go to http://www.isapirewrite.com/ for downloading it.</p>
<p>If you are having IIS7, here are the steps involved in converting those rules.</p>
<p>The x86 version of URL Rewrite module can be downloaded here : <a  title="x86 URL Rewrite Module" href="http://go.microsoft.com/?linkid=9722533" target="_blank">http://go.microsoft.com/?linkid=9722533</a></p>
<p>The x64 version of URL Rewrite module can be downloaded here : <a  title="x64 URL Rewrite Module" href="http://go.microsoft.com/?linkid=9722532." target="_blank">http://go.microsoft.com/?linkid=9722532</a></p>
<p>Install the module, restart the IIS manager. Choose the website in which you have to convert the rules (under Sites category). You will see the &#8216;URL Rewrite&#8217; module in IIS.</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/03/IIS_1.png" class="thickbox no_icon" rel="gallery-1796" title="IIS_1"><img class="alignnone size-full wp-image-1806" title="IIS_1" src="http://www.supportsages.com/blog/wp-content/uploads/2011/03/IIS_1.png" alt="" width="508" height="376" /></a></p>
<p>Open it. Since the web.config file is already created with some predefined rules, you will see it as Inbound rules (by the Names &#8211; Security Rule and SEO Rule).</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/03/IIS_2.png" class="thickbox no_icon" rel="gallery-1796" title="IIS_2"><img class="alignnone size-full wp-image-1811" title="IIS_2" src="http://www.supportsages.com/blog/wp-content/uploads/2011/03/IIS_2.png" alt="" width="575" height="335" /></a></p>
<p>You can convert the rules in .htaccess file by accessing the &#8216;Import Rules&#8217; under Inbound Rules category in the Actions pane.</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/03/IIS_3.png" class="thickbox no_icon" rel="gallery-1796" title="IIS_3"><img class="alignnone size-full wp-image-1813" title="IIS_3" src="http://www.supportsages.com/blog/wp-content/uploads/2011/03/IIS_3.png" alt="" width="191" height="352" /></a></p>
<p>Choose the .htaccess file and click Import. You will see the rules in &#8216;Rewrite Rules&#8217; section and the converted rules in &#8216;Converted Rules&#8217; option. Click Apply on the  Actions pane on the right hand side to save these rules to the web.config file (If a web.config file was not created as mentioned earlier, that file will be newly created). Make sure there are no conflicts in the conversion. Watch the Summary on the bottom end. There was a conflict when we did it, its shown here. In such cases, remove any unsupported rules and then click Apply.</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/03/IIS_4.png" class="thickbox no_icon" rel="gallery-1796" title="IIS_4"><img class="alignnone size-full wp-image-1816" title="IIS_4" src="http://www.supportsages.com/blog/wp-content/uploads/2011/03/IIS_4.png" alt="" width="705" height="528" /></a><strong> </strong></p>
<p><strong>Converting PHP to FastCGI</strong></p>
<p>We have do it from Plesk control panel. If you don&#8217;t have the administrator access, you may need to contact your Administrator. Others (Gods !) read on</p>
<p>Select the Domain, go to Web Hosting Settings.</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/03/Plesk_1.png" class="thickbox no_icon" rel="gallery-1796" title="Plesk_1"><img class="alignnone size-full wp-image-1820" title="Plesk_1" src="http://www.supportsages.com/blog/wp-content/uploads/2011/03/Plesk_1.png" alt="" width="668" height="123" /></a></p>
<p>Scroll down to Services. Choose PHP support to run as FastCGI application.</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/03/Plesk_2.png" class="thickbox no_icon" rel="gallery-1796" title="Plesk_2"><img class="alignnone size-full wp-image-1822" title="Plesk_2" src="http://www.supportsages.com/blog/wp-content/uploads/2011/03/Plesk_2.png" alt="" width="581" height="160" /></a></p>
<p><strong>Final Steps</strong></p>
<p>Go to Joomla Administrator interface. Access <strong>Global Configuration</strong> from the main menu. Under SEO Settings, make sure the following are set to Yes</p>
<p>Search Engine Friendly URLs : Yes</p>
<p>Use Apache mod_rewrite : Yes</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/03/SEO.png" class="thickbox no_icon" rel="gallery-1796" title="SEO"><img class="alignnone size-full wp-image-1821" title="SEO" src="http://www.supportsages.com/blog/wp-content/uploads/2011/03/SEO.png" alt="" width="310" height="147" /></a></p>
<p>Done, From now your Joomla website shoule work as smooth as it were in the Linux server. Sit back and Enjoy !</p>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=Joomla+in+IIS+7+%3A+SEO+Friendly+URLs+not+working+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1796" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=Joomla+in+IIS+7+%3A+SEO+Friendly+URLs+not+working+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1796" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2011/04/joomla-in-iis-7-seo-friendly-urls-not-working/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

