<?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>System Network Programming Solution - Linux - windows - centos- security- cpanel - plesk -directadmin helm&#187; centos</title>
	<atom:link href="http://thegioinguonmo.com/tag/centos/feed/" rel="self" type="application/rss+xml" />
	<link>http://thegioinguonmo.com</link>
	<description>SHARING EVERYTHING</description>
	<lastBuildDate>Sat, 19 May 2012 21:40: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>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>DirectAdmin 1.391 : pcfg_openfile: unable to check htaccess file, ensure it is readable</title>
		<link>http://thegioinguonmo.com/hosting-controller/directadmin/directadmin-1391-pcfgopenfile-unable-check-htaccess-file-ensure-readable.html</link>
		<comments>http://thegioinguonmo.com/hosting-controller/directadmin/directadmin-1391-pcfgopenfile-unable-check-htaccess-file-ensure-readable.html#comments</comments>
		<pubDate>Sat, 19 May 2012 21:40:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DirectAdmin]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[directadmin]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[web server]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=2059</guid>
		<description><![CDATA[Today, I got a problem with one of my website. Suddenly, I could access my website using Nginx but all themes were gone. I, then, switched back to Apache. It became worse. I can&#8217;t access my website at all. The error when access my website using Apache is below : Forbidden You don't have permission [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I got a problem with one of my website. Suddenly, I could access my website using Nginx but all themes were gone. I, then, switched back to Apache. It became worse. I can&#8217;t access my website at all. The error when access my website using Apache is below :</p>
<div>
<div><strong><span style="color: #ff0000;"><code>Forbidden</code></span></strong></div>
<div></div>
<div><strong><span style="color: #ff0000;"><code>You don't have permission to access / on this server.</code></span></strong></div>
<div></div>
<div><strong><span style="color: #ff0000;"><code>Additionally, a 403 Forbidden error was encountered </code><code>while</code> <code>trying to use an ErrorDocument to handle the request.</code></span></strong></div>
</div>
<div></div>
<div>At first, I thought something is wrong with my configuration but then, I could access DA control panel, Munin, phpmyadmin and any other pages without any problem. Also checked permission but it looks like it&#8217;s ok. Nothing is wrong. So, I checked error log and found error like below :</div>
<div>
<pre class="brush:shell">[Thu Dec 29 14:53:01 2011] [crit] [client xx.xx.xx.xx] (13)Permission denied: /home/admin/domains/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable</pre>
<p>Google and found in DirectAdmin. Basically, it&#8217;s something about permission which I may not know what it is. John is kindly provided an updated <strong>set_permissions.sh</strong> allow us to set permission to specific user. You can get it from here -&gt; <a rel="nofollow" target="_blank" href="http://files.directadmin.com/services/all/set_permissions.sh">http://files.directadmin.com/services/all/set_permissions.sh</a></p>
<p>Use it by type :</p>
<pre class="brush:shell">./set_permisions.sh set_user_home username</pre>
<p>where <strong>username</strong> has to changed to the one you want. John said that <strong>set_permissions.sh</strong> will be included in the future version of DirectAdmin.</p>
<p><strong>Source : </strong><a rel="nofollow" target="_blank" href="http://www.directadmin.com/forum/showthread.php?t=39278">http://www.directadmin.com/forum/showthread.php?t=39278</a></p>
</div>
<h4>Incoming search terms:</h4><ul><li><a href="http://thegioinguonmo.com/hosting-controller/directadmin/directadmin-1391-pcfgopenfile-unable-check-htaccess-file-ensure-readable.html" title="(13)permission denied: / htaccess pcfg_openfile: unable to check htaccess file ensure it is readable cpanel vps">(13)permission denied: / htaccess pcfg_openfile: unable to check htaccess file ensure it is readable cpanel vps</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/hosting-controller/directadmin/directadmin-1391-pcfgopenfile-unable-check-htaccess-file-ensure-readable.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script to find how many mails sent from an account</title>
		<link>http://thegioinguonmo.com/os/linux/script-to-find-how-many-mails-sent-from-an-account.html</link>
		<comments>http://thegioinguonmo.com/os/linux/script-to-find-how-many-mails-sent-from-an-account.html#comments</comments>
		<pubDate>Thu, 17 May 2012 09:40:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[print]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=145</guid>
		<description><![CDATA[grep xxx@xxx.com /var/log/exim_mainlog &#124; grep “&#60;=” &#124; awk {’print $3′} &#124; wc -l]]></description>
			<content:encoded><![CDATA[<p>grep <a rel="nofollow" target="_blank" href="mailto:nursing@reseller9.serverc1.com" target="_blank">xxx@xxx.com</a> /var/log/exim_mainlog | grep “&lt;=” | awk {’print $3′} | wc -l</p>
]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/os/linux/script-to-find-how-many-mails-sent-from-an-account.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ghosting The Machine</title>
		<link>http://thegioinguonmo.com/os/linux/ghosting-the-machine.html</link>
		<comments>http://thegioinguonmo.com/os/linux/ghosting-the-machine.html#comments</comments>
		<pubDate>Tue, 15 May 2012 21:40:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[PC]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1286</guid>
		<description><![CDATA[This is a short but potentially extremely handy guide to ghosting one Linux box to another (or simply making a full backup of a desktop/server). Credit goes to ‘topdog’ for this. You might have a small office where you customise one desktop just how you like it and need to roll this out to N [...]]]></description>
			<content:encoded><![CDATA[<p>This is a short but potentially extremely handy guide to ghosting one Linux box to another (or simply making a full backup of a desktop/server). Credit goes to ‘topdog’ for this.</p>
<p>You might have a small office where you customise one desktop just how you like it and need to roll this out to N other PC’s or simply want a backup of a server or desktop to another machine or even to an image file.</p>
<p>The main tool here is netcat which is extremely powerful and has a multitude of other great uses that won’t be covered here.</p>
<p>Target Machine:</p>
<p>** Boot to linux rescue mode with networking (CentOS works fine)</p>
<p>Initiate netcat to listen on port 30 – # nc -l -p<br />
| dd of=/dev/sda (assuming the hard drive is sda and not hda):</p>
<p><code># nc -l -p 30 | dd of=/dev/sda</code></p>
<p>Source Machine:</p>
<p>Dump the contents of the disk to the target PC – #dd if=/dev/sda | nc</p>
<p><code># dd if=/dev/sda | nc 192.168.0.20 30</code></p>
<p>Then to check that traffic is flowing, on the source go to another terminal (ALT/F2) and dump the tcp data on the NIC (assuming it’s eth0):</p>
<p><code>tcpdump -tnli eth0 port 30</code></p>
<p>If you just want a backup image you could change the above output on the taget to:</p>
<p><code># nc -l -p 30 | dd of=mybackup.img</code></p>
<p>That’s it. Naturally the target PC/disk cannot be smaller than the source:) I hope this saves someone a lot of time.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://thegioinguonmo.com/os/linux/ghosting-the-machine.html" title="centos nc and dd">centos nc and dd</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/os/linux/ghosting-the-machine.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Renaming files with –– at the start</title>
		<link>http://thegioinguonmo.com/os/linux/renaming-files-with-%e2%80%93%e2%80%93-at-the-start.html</link>
		<comments>http://thegioinguonmo.com/os/linux/renaming-files-with-%e2%80%93%e2%80%93-at-the-start.html#comments</comments>
		<pubDate>Tue, 15 May 2012 09:39:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[home]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[user]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1383</guid>
		<description><![CDATA[I’m making a post about this because I ran into this today and I couldn’t remember how to rename a file starting with — (two or double hyphens) in Linux (e.g. –index.html). The customer has obviously used a Windows FTP client to rename index.html to –index.html so it is out of their way, and now [...]]]></description>
			<content:encoded><![CDATA[<p>I’m making a post about this because I ran into this today and I couldn’t remember how to rename a file starting with — (two or double hyphens) in Linux (e.g. –index.html). The customer has obviously used a Windows FTP client to rename index.html to –index.html so it is out of their way, and now me, the server administrator or company sysadmin, has come along with my migration script to relocate it and it has fallen over, crashed, and burned!</p>
<p>When you try and rename it the following is given:</p>
<blockquote>
<pre class="brush:plain">$ mv ––index.html index.html.renamed
mv: unrecognized option `––index.html’
Try `mv ––help’ for more information.</pre>
</blockquote>
<p>I also tried delimiting it the normal way, but it wouldn’t work either:</p>
<blockquote>
<pre class="brush:plain">    mv \–\–index.html index.html.renamed</pre>
</blockquote>
<p>The correct way to rename it is:</p>
<blockquote>
<pre class="brush:plain">    mv ./––index.html index.html.renamed</pre>
</blockquote>
<p>Because –– has special meaning, you can’t delimit it with a simple backslash (\), you have to put a path reference in there to delimit it. So my path working directory (pwd) was /home/user/data/ where the file was located, so I could use ./ to reference the current pwd. The other option is to put the full path in:</p>
<blockquote>
<pre class="brush:plain">    mv /home/user/data/––index.html index.html.renamed</pre>
</blockquote>
<p>Hopefully this helps out some other Linux server administrator out there who’s mind it has slipped.</p>
]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/os/linux/renaming-files-with-%e2%80%93%e2%80%93-at-the-start.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache2 mod_fastcgi: Connect to External PHP via UNIX Socket or TCP/IP Port</title>
		<link>http://thegioinguonmo.com/web-server/apache/apache2-modfastcgi-connect-external-php-unix-socket-tcpip-port.html</link>
		<comments>http://thegioinguonmo.com/web-server/apache/apache2-modfastcgi-connect-external-php-unix-socket-tcpip-port.html#comments</comments>
		<pubDate>Mon, 14 May 2012 21:40:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[web server]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1922</guid>
		<description><![CDATA[Now, mod_fastcgi is configured and running. FastCGI supports connection via UNIX sockets or TCP/IP networking. This is useful to spread load among various backends. For example, php will be severed from 192.168.1.10 and python / ruby on rails will be severed from 192.168.1.11. This is only possible with mod_fastcgi. Required utilities You can spawn FastCGI [...]]]></description>
			<content:encoded><![CDATA[<p>Now, <a rel="nofollow" target="_blank" href="http://www.cyberciti.biz/faq/rhel-fedora-centos-linux-enable-epel-repo/">mod_fastcgi is configured and running</a>. FastCGI supports connection via UNIX sockets or TCP/IP networking. This is useful to spread load among various backends. For example, php will be severed from 192.168.1.10 and python / ruby on rails will be severed from 192.168.1.11. This is only possible with mod_fastcgi.</p>
<h2>Required utilities</h2>
<div><a rel="nofollow" target="_blank" title="See all PHP related tips/articles" href="http://www.cyberciti.biz/tips/category/php"><img src="http://files.cyberciti.biz/cbzcache/3rdparty/php-logo.png" alt="php logo Apache2 mod fastcgi: Connect to External PHP via UNIX Socket or TCP/IP Port" border="0" title="Apache2 mod fastcgi: Connect to External PHP via UNIX Socket or TCP/IP Port" /></a></div>
<p>You can spawn FastCGI processes using a dispatcher script or using spawn-fcgi utility, which is used to spawn remote FastCGI processes. spawn-fcgi included with lighttpd web server. You can grab source code from lighttpd.net or simply install it using lighttpd as follows (you need <a rel="nofollow" target="_blank" href="http://www.cyberciti.biz/faq/rhel-fedora-centos-linux-enable-epel-repo/">EPEL repo enabled</a> under RHEL / CentOS / Fedora Linux):<br />
<code># yum install lighttpd-fastcgi<br />
# cp /usr/bin/spawn-fcgi /tmp<br />
# yum remove lighttpd-fastcgi<br />
# mv /tmp/spawn-fcgi /usr/bin/spawn-fcgi</code><br />
lighttpd-fastcgi is FastCGI module and spawning helper for lighttpd and PHP configuration.</p>
<h3>How do spawning php as TCP/IP remote app?</h3>
<p>Use /usr/bin/spawn-fcgi as follows, enter:<br />
<code># /usr/bin/spawn-fcgi -f /usr/bin/php-cgi -a 192.168.1.10 -p 9000 -P /var/run/php-cgi.fastcgi.pid -u apache -g apache</code><br />
You can also jail php, using following syntax (make sure /var/run/ and /usr/bin/php-cgi exists inside jail directory):<br />
<code># /usr/bin/spawn-fcgi -c /httpdjail -a 192.168.1.10 -p 9000 -P /var/run/php-cgi.fastcgi.pid -u apache -g apache -- /usr/bin/php-cgi</code><br />
Where,</p>
<ul>
<li><strong> -f /usr/bin/php-cgi</strong>: Filename of the fcgi-application</li>
<li><strong>-a 192.168.1.10 </strong>: Bind to ip address</li>
<li><strong>-p 9000</strong> : Bind to tcp-port</li>
<li><strong>-P /var/run/php-cgi.fastcgi.pid</strong>: Name of PID-file for spawed process</li>
<li><strong>-c /httpdjail</strong> : Chroot to directory (security feature)</li>
<li><strong>-u apache</strong> : Change to user-id (security feature &#8211; drop root user privileges to apache user)</li>
<li><strong>-g apache </strong>: Change to group-id (security feature &#8211; drop root group privileges to apache group)</li>
</ul>
<h3>Configure Apache 2 mod_fastcgi connect to external PHP fcgi application</h3>
<p>Above command will run php fcgi on 192.168.1.10:9000. Here is our sample setup:</p>
<ol>
<li>192.168.1.10 port 9000 : PHP FastCGI server</li>
<li>192.168.1.11 port 9000 : Python or Ruby on rails cgi process</li>
<li>202.54.1.20 port 80 : Apache 2 running mod_fastcgi (DocumentRoot set to /webroot/http)</li>
</ol>
<p>Open your httpd.conf on 202.54.1.20, enter:<br />
<code># vi /etc/httpd/conf/httpd.conf </code><br />
Locate your domain VirtualHost configuration and append following two directives:</p>
<pre>AddHandler php5-fastcgi .php
FastCgiExternalServer /webroot/http -host 192.168.1.10:9000</pre>
<p>Here is complete snippet from one my box:</p>
<pre>&lt;VirtualHost nixcraft.com:80&gt;
    ServerAdmin webmaster@nixcraft.com
    DocumentRoot /webroot/http
    ServerName nixcraft.com
    ErrorLog logs/nixcraft.com-error_log
    CustomLog logs/nixcraft.com-access_log common
    AddHandler php5-fastcgi .php
    FastCgiExternalServer /webroot/http -host 192.168.1.10:9000
&lt;/VirtualHost&gt;</pre>
<p>Save and close the file. Restart httpd:<br />
<code># service httpd restart</code><br />
Make sure iptables is configured to allow communication between public and private fastcgi server.</p>
<h3>How do I configure PHP FastCGI via UNIX sockets?</h3>
<p>UNIX sockets are faster as compare to TCP/IP sockets. However, they do not support remote spawning. Create /tmp/php.socket as follows:<br />
<code># /usr/bin/spawn-fcgi -f /usr/bin/php-cgi -s /tmp/php.socket -u apache -g apache</code><br />
Add following configuration to your httpd.conf virtual host:</p>
<pre>AddHandler php5-fastcgi .php
FastCgiExternalServer /webroot/http -socket /tmp/php.socket</pre>
<p>Save and close the file. Restart httpd, type:<br />
<code># service httpd restart</code></p>
<p>mod_fastcgi has lots of other options. Please refer to <a rel="nofollow" target="_blank" href="http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html" target="_blank">Apache and mod_fastcgi documentation</a> for further information.</p>
<h2>A note about mod_fastcgi limitation</h2>
<p>You can not load balance between multiple php backend. You need to use lighttpd or nginx or other reverse proxy software.</p>
]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/web-server/apache/apache2-modfastcgi-connect-external-php-unix-socket-tcpip-port.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Ketchup to manage your kernel sources</title>
		<link>http://thegioinguonmo.com/os/linux/using-ketchup-to-manage-your-kernel-sources.html</link>
		<comments>http://thegioinguonmo.com/os/linux/using-ketchup-to-manage-your-kernel-sources.html#comments</comments>
		<pubDate>Sun, 13 May 2012 21:40:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Using Ketchup]]></category>
		<category><![CDATA[version]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1312</guid>
		<description><![CDATA[Today I discovered Ketchup, a little command-line tool to manage your Linux kernel sources. If you’re one of the weirdos, who is still compiling his kernel manually for whatever reason (like I do), I can only recommend it. Ketchup nicely eases up the entire process of checking for updates and applying them to your system. [...]]]></description>
			<content:encoded><![CDATA[<p>Today I discovered Ketchup, a little command-line tool to manage your Linux kernel sources. If you’re one of the weirdos, who is still compiling his kernel manually for whatever reason (like I do), I can only recommend it. Ketchup nicely eases up the entire process of checking for updates and applying them to your system.</p>
<p>Let’s not hesitate and look at few usage examples… Want to know what’s the latest version of a particular kernel-tree?</p>
<p><code></code></p>
<pre class="brush:plain">$ ketchup -s 2.6

    2.6.17.7

$ ketchup -s 2.6-mm

    2.6.18-rc1-mm2</pre>
<p>Let’s play with your kernel sources a bit. First of all, you surely want to check what version you currently got lying around…</p>
<pre class="brush:plain">$ cd /usr/src/linux</pre>
<pre class="brush:plain">$ ketchup -m</pre>
<blockquote><p>2.6.17.6</p></blockquote>
<p>Let’s assume there is a newer kernel version available and you want to download it, bunzip it, revert the old patch and apply the new one. Nothing easier than that:</p>
<pre class="brush:plain"># cd /usr/src/linux</pre>
<pre class="brush:plain"># ketchup 2.6-tip</pre>
<blockquote><p>2.6.17.6 -&gt; 2.6.17.7</p></blockquote>
<p>Applying patch-2.6.17.6.bz2 -R</p>
<p>Applying patch-2.6.17.7.bz2</p>
<p>That’s really it. It will download the patches, revert and apply them, so all you will have to do is watch and wait</p>
<p>Switching to an entirely different kernel versions is just as easy:</p>
<p>&nbsp;</p>
<pre class="brush:plain"># cd /usr/src/linux

# ketchup 2.6.16.2</pre>
<p>&nbsp;</p>
<p>Final note: If Ketchup should abort with a gpg error, then it couldn’t verify the patch’s or kernel’s signature. Either add the 2.6 public key to your keyring (this is the proper solution) or call Ketchup with an additional -G parameter (this will override signature checking). I’d suggest the former, which is really easy to do by downloading it from a public pgp server:</p>
<pre class="brush:plain"># gpg --keyserver wwwkeys.pgp.net --recv-keys 0x517D0F0E</pre>
<p>Have fun compiling,</p>
]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/os/linux/using-ketchup-to-manage-your-kernel-sources.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS, Apache &amp; mod_fcgid: IPCCommTimeout not working as expected</title>
		<link>http://thegioinguonmo.com/web-server/apache/centos-apache-modfcgid-ipccommtimeout-working-expected.html</link>
		<comments>http://thegioinguonmo.com/web-server/apache/centos-apache-modfcgid-ipccommtimeout-working-expected.html#comments</comments>
		<pubDate>Sat, 12 May 2012 21:44:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mod_fcgid]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=2102</guid>
		<description><![CDATA[If you&#8217;re running Apache with the mod_fcgid module to let your PHP scripts be handled in a seperate module, you can run into this annoying little bug in the mod_fcgid 2.2.x implementations. The problem: mod_fcgid: read data timeout in xx seconds First, check if you have the mod_fcgid module that is causing these problems. # [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re running Apache with the mod_fcgid module to let your PHP scripts be handled in a seperate module, you can run into this <a rel="nofollow" target="_blank" href="http://loeki.tv/log/archives/93-IPCCommTimeout-not-working-with-mod_fcgid-2.2.html">annoying little bug</a> in the mod_fcgid 2.2.x implementations.</p>
<h2>The problem: mod_fcgid: read data timeout in xx seconds</h2>
<p>First, check if you have the mod_fcgid module that is causing these problems.</p>
<pre class="brush:plain"># rpm -qa |grep -i mod_fcgid
mod_fcgid-2.2-11.el5</pre>
<p>Apparently, any 2.2.x branche has this bug.</p>
<p>The problem exists <strong>if any VirtualHost does not have the IPCommTimeout value</strong>. If there&#8217;s a VirtualHost where this setting is not defined, it will reset the configuration globally back to the default of 40 seconds, resulting in the following error you Apache&#8217;s error logs.</p>
<pre class="brush:plain">[warn] mod_fcgid: read data timeout in 40 seconds
Premature end of script headers: php-cgi, referer: [snip]</pre>
<p>And they will throw a <strong>500 Internal Server Error</strong> in your access logs.</p>
<pre class="brush:plain">“GET /path/to/url HTTP/1.1″ 500 537</pre>
<h2>The solution: IPCommTimeout in every virtual host</h2>
<p>The solution sucks if you have many (manually controlled) virtual hosts, but you have to define the IPCommTimeout option in every Virtual Host on the server. If one is missing, it will reset the config of that parameter to the default <em>serverwide</em>. So place the following codeblock in every Virtual Host you have.</p>
<pre class="brush:plain">&lt;IfModule mod_fcgid.c&gt;
IPCCommTimeout          360
IPCConnectTimeout       360
&lt;/IfModule&gt;</pre>
<p>The values above are expressed in seconds.</p>
]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/web-server/apache/centos-apache-modfcgid-ipccommtimeout-working-expected.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intrusion Detection With BASE And Snort &#8211; Part1</title>
		<link>http://thegioinguonmo.com/os/linux/intrusion-detection-with-base-and-snort-part1.html</link>
		<comments>http://thegioinguonmo.com/os/linux/intrusion-detection-with-base-and-snort-part1.html#comments</comments>
		<pubDate>Sat, 12 May 2012 09:40:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[snort]]></category>
		<category><![CDATA[wget]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=42</guid>
		<description><![CDATA[This tutorial shows how to install and configure BASE (Basic Analysis and Security Engine) and the Snort intrusion detection system (IDS) on a Debian Sarge system. BASE provides a web front-end to query and analyze the alerts coming from a Snort IDS system. With BASE you can perform analysis of intrusions that Snort has detected [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial shows how to install and configure BASE (Basic Analysis and Security Engine) and the Snort intrusion detection system (IDS) on a Debian Sarge system. BASE provides a web front-end to query and analyze the alerts coming from a Snort IDS system. With BASE you can perform analysis of intrusions that Snort has detected on your network.</p>
<p>Scenario: A linux server running Debian Sarge 3.1 setup according to <a rel="nofollow" target="_blank" href="http://www.howtoforge.com/perfect_setup_debian_sarge">Falko&#8217;s &#8211; The Perfect Setup &#8211; Debian Sarge (3.1)</a>.<br />
Let&#8217;s assume we have one working website (www.example.com) and that the document root is: /var/www/www.example.com/web<br />
The IP of the server is 192.168.0.5 and it&#8217;s using eth0 as network interface name.</p>
<h3>Needed programs and files</h3>
<ul>
<li>Snort</li>
<li>Snort rules</li>
<li>PCRE (Perl Compatible Regular Expressions)</li>
<li>LIBPCAP</li>
<li>BASE (Basic Analysis and Security Engine)</li>
<li>ADOdb (ADOdb Database Abstraction Library for PHP (and Python).)</li>
</ul>
<h3>Downloading and untaring</h3>
<p>We need a temporary place for all the files that we are going to download, and untar.<br />
To keep things simple we will create a directory in the /root named snorttemp. (It&#8217;s obvious that this download directory can be any name and in anyplace)</p>
<p>cd /root<br />
mkdir snorttemp<br />
cd snorttemp</p>
<p>Now you need to get Snort.<br />
The latest version at the time of writing this is 2.6.0</p>
<p>wget http://www.snort.org/dl/current/snort-2.6.0.tar.gz</p>
<p>When the download is finished untar the file:</p>
<p>tar -xvzf snort-2.6.0.tar.gz</p>
<p>And letâ€™s remove the tar file:</p>
<p>rm snort-2.6.0.tar.gz</p>
<p>We also need the Snort rules!<br />
Go to: <a rel="nofollow" target="_blank" href="http://www.snort.org/pub-bin/downloads.cgi" target="_blank">http://www.snort.org/pub-bin/downloads.cgi</a> and scroll down till you see the &#8220;Sourcefire VRT Certified Rules &#8211; The Official Snort Ruleset (unregistered user release)&#8221; rules<br />
(If you are a member of the forum you can also download the &#8211; registered user release):</p>
<p>wget http://www.snort.org/pub-bin/downloads.cgi/Download/vrt_pr/snortrules-pr-2.4.tar.gz</p>
<p>Move the snortrules-pr-2.4.tar.gz into the snort-2.6.0 map:</p>
<p>mv snortrules-pr-2.4.tar.gz /root/snorttemp/snort-2.6.0</p>
<p>and cd into snort-2.6.0:</p>
<p>cd snort-2.6.0</p>
<p>Untar the snortrules-pr-2.4.tar.gz file:</p>
<p>tar -xvzf snortrules-pr-2.4.tar.gz</p>
<p>Remove the tar file:</p>
<p>rm snortrules-pr-2.4.tar.gz</p>
<p>We are done downloading the files needed to get Snort to work.</p>
<p>To make snort work with BASE, we need more!</p>
<h4>PCRE &#8211; Perl Compatible Regular Expressions.</h4>
<p>Go to: <a rel="nofollow" target="_blank" href="http://www.pcre.org/" target="_blank">http://www.pcre.org/</a> and select a download link for the pcre-6.3tar.gz file to download PCRE (at time of writing this it is pcre-6.3.tar.gz)<br />
cd back to the snorttemp map:</p>
<p>cd /root/snorttemp</p>
<p>and download the pcre-6.3.tar.gz file:</p>
<p>wget http://surfnet.dl.sourceforge.net/sourceforge/pcre/pcre-6.3.tar.gz</p>
<p>Untar the file:</p>
<p>tar -xvzf pcre-6.3.tar.gz</p>
<p>Remove the tar:</p>
<p>rm pcre-6.3.tar.gz</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://thegioinguonmo.com/os/linux/intrusion-detection-with-base-and-snort-part1.html" title="snort base apache windows">snort base apache windows</a> (1)</li><li><a href="http://thegioinguonmo.com/os/linux/intrusion-detection-with-base-and-snort-part1.html" title="snort programming">snort programming</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/os/linux/intrusion-detection-with-base-and-snort-part1.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shell script to create list of backup files in ~/.mybackup file. Use with mybackup shell script</title>
		<link>http://thegioinguonmo.com/programing/shell-script/shell-script-to-create-list-of-backup-files-in-mybackup-file-use-with-mybackup-shell-script.html</link>
		<comments>http://thegioinguonmo.com/programing/shell-script/shell-script-to-create-list-of-backup-files-in-mybackup-file-use-with-mybackup-shell-script.html#comments</comments>
		<pubDate>Fri, 11 May 2012 21:40:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[shell script]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1649</guid>
		<description><![CDATA[#!/bin/bash # mybackupadd - Add file to ~/.mybackup file, then backup and email all # file as tar.gz to your email a/c. # # Usage : ./mybackupadd ~/public_html/ # # Copyright (C) 2004 nixCraft project # Email : http://cyberciti.biz/fb/ # Date : Aug-2004 # ------------------------------------------------------------------------- # This program is free software; you can redistribute it [...]]]></description>
			<content:encoded><![CDATA[<pre class="brush:shell">#!/bin/bash
# mybackupadd - Add file to ~/.mybackup file, then backup and email all
# file as tar.gz to your email a/c.
#
# Usage   : ./mybackupadd ~/public_html/
#
# Copyright (C) 2004 nixCraft project
# Email   : http://cyberciti.biz/fb/
# Date    : Aug-2004
# -------------------------------------------------------------------------
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# -------------------------------------------------------------------------
# This script is part of nixCraft shell script collection (NSSC)
# Visit http://bash.cyberciti.biz/ for more information.
# -------------------------------------------------------------------------

FILE=~/.mybackup
MYH=~
CWD=`pwd`
SRC=$1

if [ "$SRC" == "" ]; then
  echo "Must supply dir or file name"
  exit 1
fi
# if list $FILE does not exist
[ ! -f $FILE ] &amp;&amp; touch $FILE || :

# make sure that file or dir exists to backup
if [ ! -f $SRC ]; then
   if [ ! -d $SRC ]; then
      echo "$SRC does not exists"
      exit 2
   fi
fi
# make sure we don't do add duplicate stuff
cat $FILE | grep -w $SRC &gt; /dev/null
if [ "$?" == "0" ]; then
   echo "$SRC exists in $FILE"
   exit 3
fi
# okay now add that to backup list
echo "$SRC" &gt;&gt; $FILE
echo "$SRC added to $FILE"</pre>
]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/programing/shell-script/shell-script-to-create-list-of-backup-files-in-mybackup-file-use-with-mybackup-shell-script.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Check The Health of Adaptec RAID array</title>
		<link>http://thegioinguonmo.com/os/linux/linux-check-the-health-of-adaptec-raid-array.html</link>
		<comments>http://thegioinguonmo.com/os/linux/linux-check-the-health-of-adaptec-raid-array.html#comments</comments>
		<pubDate>Thu, 03 May 2012 21:39:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[visit]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=143</guid>
		<description><![CDATA[Q. How do I check the health of Adaptec RAID array under Fedora / CentOS / Red Hat Enterprise Linux / Debian / Ubuntu Linux server from a shell prompt? A. First, visit official Adaptec web site to download utilities. You can also install utility software from CD / Floppy disk. Install the rpm file. [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;"><strong>Q.</strong></span> How do I check the health of Adaptec RAID array under Fedora / CentOS / Red Hat Enterprise Linux / Debian / Ubuntu Linux server from a shell prompt?</p>
<p><strong><span style="color: #008000;">A.</span></strong> First, visit official <a rel="nofollow" target="_blank" href="http://www.adaptec.com/en-US/support/raid/" target="_blank">Adaptec</a> web site to download utilities. You can also install utility software from CD / Floppy disk. Install the rpm file.</p>
<p>&nbsp;</p>
<h2>arcconf command</h2>
<p>To view and modify other RAID configuration use arcconf program to view health of RAID array. Simply, login as the root and type the following command at a shell prompt:<br />
<code># /usr/StorMan/arcconf getconfig 1</code></p>
<h4>Incoming search terms:</h4><ul><li><a href="http://thegioinguonmo.com/os/linux/linux-check-the-health-of-adaptec-raid-array.html" title="vmware arcconf verify">vmware arcconf verify</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://thegioinguonmo.com/os/linux/linux-check-the-health-of-adaptec-raid-array.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: thegioinguonmo.com @ 2012-05-20 18:20:40 -->
