<?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>A K Chauhan's Blog &#187; Linux</title>
	<atom:link href="http://www.akchauhan.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.akchauhan.com</link>
	<description>PHP, MySql, JavaScript, JQuery, Prototype, Drupal, HTML, CSS and more...</description>
	<lastBuildDate>Mon, 02 Jan 2012 03:29:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Generate Crontab (Cron jobs) syntax/command using this simple tool</title>
		<link>http://www.akchauhan.com/create-crontab-cron-jobs-command-using-this-simple-tool/</link>
		<comments>http://www.akchauhan.com/create-crontab-cron-jobs-command-using-this-simple-tool/#comments</comments>
		<pubDate>Sun, 26 Dec 2010 14:34:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[cron jobs]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://www.akchauhan.com/?p=650</guid>
		<description><![CDATA[Click here to Check it! Cron is a daemon used for scheduling tasks to be executed at a certain time. You can easily find great articles on Crontab or Cron daemon on the Internet. I found these articles very useful and easy to understand. 1. https://help.ubuntu.com/community/CronHowto 2. http://en.wikipedia.org/wiki/Cron Actually, here I don&#8217;t want to explain [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css">
.button_cron {
   border-top: 1px solid #96d1f8;
   background: #65a9d7;
   background: -webkit-gradient(linear, left top, left bottom, from(#3e779d), to(#65a9d7));
   background: -moz-linear-gradient(top, #3e779d, #65a9d7);
   padding: 10.5px 21px;
   -webkit-border-radius: 8px;
   -moz-border-radius: 8px;
   border-radius: 8px;
   -webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
   -moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
   box-shadow: rgba(0,0,0,1) 0 1px 0;
   text-shadow: rgba(0,0,0,.4) 0 1px 0;
   color: white;
   font-size: 14px;
   font-family: Georgia, Serif;
   text-decoration: none;
   vertical-align: middle;
   }
.button_cron:hover {
   border-top-color: #28597a;
   background: #28597a;
   color: #ccc;
   }
.button_cron:active {
   border-top-color: #1b435e;
   background: #1b435e;
   }
</style>
<p><div id="attachment_651" class="wp-caption aligncenter" style="width: 875px"><a href="http://www.akchauhan.com/tools/crontab/" target="_blank"><img src="http://www.akchauhan.com/wp-content/uploads/2010/12/crontab.png" alt="Create Crontab command using this simple tool" title="Create Crontab command using this simple tool" width="865" height="489" class="size-full wp-image-651" /></a><p class="wp-caption-text">Create Crontab command using this simple tool</p></div><br />
<br/>
<div style="text-align:center; width:980px;"><a href="http://www.akchauhan.com/tools/crontab/" target="_blank" class="button_cron">Click here to Check it!</a></div>
<p><br/><br />
Cron is a daemon used for scheduling tasks to be executed at a certain time. You can easily find great articles on Crontab or Cron daemon on the Internet. I found these articles very useful and easy to understand. </p>
<p>1. <a href="https://help.ubuntu.com/community/CronHowto">https://help.ubuntu.com/community/CronHowto</a><br />
2. <a href="http://en.wikipedia.org/wiki/Cron">http://en.wikipedia.org/wiki/Cron</a></p>
<p>Actually, here I don&#8217;t want to explain how crontab work and how you can schedule tasks using crontab. I just want to discuss this tool I&#8217;ve created for generating crontab entries/syntax which you can copy and directly put in your crontab file. </p>
<p>In this tool there are five sections; minute, hour, day, month and weekday. You can select single or multiple values for each section from the list which you want to use in your crontab file. </p>
<p>You may want to run a script some number of times per time section. For example if you want to run crontab job in every 10 minutes (runs on minutes divisible by 10: 0, 10, 20, 30, etc.). In this case you can use &#8220;Every (x) minute&#8221; option and select 10 from drop down list. You can also get the correct output from &#8220;Minutes(s)&#8221; list but this option will generate less cumbersome output. </p>
<p>In &#8220;Command&#8221; text box you need to enter full command you want to execute in crontab. When you click Submit you will see this command with values for different section. </p>
<p>There should be single space between each section with the final section (command) can having one or more spaces in it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.akchauhan.com/create-crontab-cron-jobs-command-using-this-simple-tool/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Create Virtual Hosts and run multiple websites on Amazon server</title>
		<link>http://www.akchauhan.com/create-virtual-hosts-and-run-multiple-websites-on-amazon-server/</link>
		<comments>http://www.akchauhan.com/create-virtual-hosts-and-run-multiple-websites-on-amazon-server/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 07:42:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Vistual Host]]></category>

		<guid isPermaLink="false">http://www.akchauhan.com/?p=525</guid>
		<description><![CDATA[You can create virtual hosts on any Linux or window platform if you are using Apache web server. Virtual hosts or v-hosts is basically Apache feature. I&#8217;m considering here Amazon server running with Apache version 2 or above. So, basically for creating v-hosts you need to modify Apache&#8217;s configuration (httpd.conf) file. You need the root [...]]]></description>
			<content:encoded><![CDATA[<p>You can create <strong>virtual hosts</strong> on any Linux or window platform if you are using <strong>Apache web server</strong>. Virtual hosts or v-hosts is basically Apache feature. I&#8217;m considering here Amazon server running with Apache version 2 or above. So, basically for creating v-hosts you need to modify Apache&#8217;s configuration (<strong>httpd.conf</strong>) file. You need the root access for all this modifications. Here I&#8217;m showing how we create the &#8220;<strong>name-based virtual hosting</strong>&#8220;. This is the easiest way of creating virtual host.<br />
On Amazon server httpd.conf is located on &#8216;<strong>/etc/httpd/conf/httpd.conf</strong>&#8216; location. You need to follow these steps:-<br/><br />
<strong>1. First, take the backup of this file so in case if anything goes wrong you can rollback changes.</strong><br />
<strong>2. Download this file in your local machine and open it in any text editor.</strong><br />
<strong>3. Go to section 3 (Virtual Hosts)  of this document.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">### Section 3: Virtual Hosts</pre></div></div>

<p><strong>4. Un-comment this line</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">NameVirtualHost *:80</pre></div></div>

<p><strong>5. Now create v-hosts like this</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;VirtualHost *:<span style="color: #cc66cc;">80</span>&gt;</span>
    ServerAdmin admin@mydomain1.com
    DocumentRoot /var/www/html/domainname1
    ServerName www.domainname1.com
    ErrorLog logs/www.domainname1.com-error_log
    CustomLog logs/www.domainname1.com-access_log common
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>VirtualHost&gt;</span>
<span style="color: #009900;">&lt;VirtualHost *:<span style="color: #cc66cc;">80</span>&gt;</span>
    ServerAdmin admin@mydomain2.com
    DocumentRoot /var/www/html/domainname2
    ServerName www.domainname2.com
    ErrorLog logs/www.domainname2.com-error_log
    CustomLog logs/www.domainname2.com-access_log common
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>VirtualHost&gt;</span></pre></div></div>

<p>Here we have create two virtual host one <strong>www.domainname1.com</strong> and second one <strong>www.domainname2.com</strong>. <strong>We have specified 5 Apache directive into a VirtualHost container.</strong> We can put almost any Apache directive into a VirtualHost container. Let&#8217;s discuss each one by one.<br/><br />
<strong>ServerAdmin</strong> &#8211; Here we specified email address of server administrator. If there is any issue Apache show this email address for contact.<br />
<strong>DocumentRoot </strong> &#8211; Here we give the absolute path of directory where our website files are located.<br />
<strong>ServerName </strong> &#8211; Here we give the name of our domain which is pointed to &#8220;/var/www/html/domainname1&#8243; directory.<br />
<strong>ErrorLog</strong> &#8211; Absolute path of Error log file for this domain.<br />
<strong>CustomLog</strong> &#8211; Absolute path of custom log file for this domain.<br/></p>
<p><strong>6. Restart the Apache web server to apply these changes.</strong><br />
You can restart your Apache server using Terminal or Putty on Windows.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">service httpd restart</pre></div></div>

<p><strong>Note:-</strong> One more thing which you need to do is you need to point both the domains &#8220;www.domainname1.com&#8221; and &#8220;www.domainname2.com&#8221; to the IP address of the Amazon server. </p>
<p>The Apache server it self find out the domain name form <strong>request header</strong> and point the incoming request to correct &#8220;<strong>DocumentRoot</strong>&#8221; directory.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.akchauhan.com/create-virtual-hosts-and-run-multiple-websites-on-amazon-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Use lynx to run php file in crontab manager</title>
		<link>http://www.akchauhan.com/use-lynx-to-run-php-file-in-crontab-manager/</link>
		<comments>http://www.akchauhan.com/use-lynx-to-run-php-file-in-crontab-manager/#comments</comments>
		<pubDate>Tue, 19 May 2009 10:50:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[lynx]]></category>

		<guid isPermaLink="false">http://www.akchauhan.com/?p=370</guid>
		<description><![CDATA[Today, I was trying to set a php script file in crontab on Godaddy Virtual Dedicated server. Crontab executing that PHP script with warning. Actually, its not including the files which I am including using &#8216;require_once()&#8216; function. I have used the relative path for all the included files and its not possible to me to [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I was trying to set a php script file in crontab on <strong>Godaddy Virtual Dedicated server</strong>. Crontab executing that PHP script with warning. Actually, its not including the files which I am including using &#8216;<strong>require_once()</strong>&#8216; function. I have used the <strong>relative path</strong> for all the included files and its not possible to me to give <strong>absolute path</strong> for all files which are included. So, to solve this problem I have used <strong>lynx</strong>.</p>
<p><strong>LYNX</strong> &#8211; lynx is the <strong>command line browser</strong> which is available on almost all the Linux versions. For more detail <a href="http://lynx.isc.org/" target="_blank">click here</a>.</p>
<p>Instead, of using this command</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">/</span>usr<span style="color: #339933;">/</span>bin<span style="color: #339933;">/</span>php <span style="color: #339933;">/</span>html<span style="color: #339933;">/</span>abc<span style="color: #339933;">/</span>public_html<span style="color: #339933;">/</span>cron<span style="color: #339933;">.</span>php</pre></div></div>

<p>I have used this command</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">/</span>usr<span style="color: #339933;">/</span>bin<span style="color: #339933;">/</span>lynx <span style="color: #339933;">-</span>source http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//www.mywebsite.com/cron.php</span></pre></div></div>

<p>in crontab manager. So, what <strong>lynx </strong>did is Its opens my <strong>cron.php</strong> files when this cron job execute.<br/><br />
<strong>-source</strong> Outputs HTML source instead of formatted text. To see all the available options of lunx <a href="http://lynx.isc.org/lynx2.8.6/lynx2-8-6/lynx_help/Lynx_users_guide.html" target="_blank">click here</a>.<br/><br />
If you don&#8217;t know the path of lynx on your server you can use <strong>&#8221;whereis lynx&#8221; command</strong> using <strong>SSH</strong>. It will give you path of <strong>lynx directory</strong> on your server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.akchauhan.com/use-lynx-to-run-php-file-in-crontab-manager/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

