<?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>NiceCabbage Blog &#187; apache</title>
	<atom:link href="http://www.nicecabbage.com/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nicecabbage.com</link>
	<description>Life, Design, Web Application</description>
	<lastBuildDate>Mon, 07 Jun 2010 02:03:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Accidental Server Down &#8230; (and so sorry for that!)</title>
		<link>http://www.nicecabbage.com/2009/09/accidental-server-down-and-so-sorry-for-that/</link>
		<comments>http://www.nicecabbage.com/2009/09/accidental-server-down-and-so-sorry-for-that/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 14:07:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Failures]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.nicecabbage.com/?p=175</guid>
		<description><![CDATA[My webserver was down since 13th September. It was an accident, and I did not know that until today.
No apache2 processes alive. my web server has gone away by some reasons.
So I started a deep investigation on log files. 
When I checking through auth.log files with

cd /var/log;sudo find auth.log -type f -exec grep Success &#123;&#125; [...]]]></description>
			<content:encoded><![CDATA[<p>My webserver was down since 13th September. It was an accident, and I did not know that until today.<br />
No apache2 processes alive. my web server has gone away by some reasons.</p>
<p>So I started a deep investigation on log files. </p>
<p>When I checking through auth.log files with</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log;<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">find</span> auth.log <span style="color: #660033;">-type</span> f <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> Success <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null \;</pre></div></div>

<p>and  I found a lot of</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">auth.log.5.gz:Aug 29 10:46:03 Shaseki su[6944]: Successful su for nobody by root
auth.log.5.gz:Aug 29 10:46:03 Shaseki su[6949]: Successful su for nobody by root
auth.log.5.gz:Aug 29 10:46:03 Shaseki su[6951]: Successful su for nobody by root</pre></div></div>

<p>Was my server hacked by someone&#8230;? Some clever guy attacked my server and got my root password anyhow, so that he can take full control over my machine??</p>
<p>At the first time I saw these messages, I was so astonished and could not say a word.<br />
But in a few minutes I came to myself and googled that message, and I was relieved. </p>
<p>It was not by a unknown hacker. this is by cron. Open /etc/crontab and found that</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">11 *    * * *   root    cd / &amp;&amp; run-parts --report /etc/cron.hourly
46 10    * * *   root    test -x /usr/sbin/anacron || ( cd / &amp;&amp; run-parts --report /etc/cron.daily )
15 10    * * 7   root    test -x /usr/sbin/anacron || ( cd / &amp;&amp; run-parts --report /etc/cron.weekly 
)
50 10    1 * *   root    test -x /usr/sbin/anacron || ( cd / &amp;&amp; run-parts --report /etc/cron.monthly
 )</pre></div></div>

<p>As you can see, the time in log messages are almost same as that in crontab. </p>
<p>Hmmmm, So what the hell made my apache gone away?</p>
<p>When I tried to restart my apache like</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>apache2ctl <span style="color: #660033;">-k</span> start</pre></div></div>

<p>I got</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">98</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>Address already <span style="color: #000000; font-weight: bold;">in</span> use: make_sock: could not <span style="color: #7a0874; font-weight: bold;">bind</span> to address <span style="color: #7a0874; font-weight: bold;">&#91;</span>::<span style="color: #7a0874; font-weight: bold;">&#93;</span>:<span style="color: #000000;">80</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">98</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>Address already <span style="color: #000000; font-weight: bold;">in</span> use: make_sock: could not <span style="color: #7a0874; font-weight: bold;">bind</span> to address 0.0.0.0:<span style="color: #000000;">80</span>
no listening sockets available, shutting down
Unable to open logs</pre></div></div>

<p>,so I could not start up my apache.</p>
<p>Obviously, some process already hold port 80. but</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">lsof <span style="color: #660033;">-i</span> :<span style="color: #000000;">80</span></pre></div></div>

<p>returns nothing. I also tried</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">nestat <span style="color: #660033;">-an</span></pre></div></div>

<p>, but could not find any clues of por-80-riders.</p>
<p>At last, thoght this is what I did not like to, I <strong>rebooted</strong> the system.</p>
<p>In a few minutes, everything comes back well and, as you see, my apache2 starts running healthly again.</p>
<p>If you know something about such a phenomenon, please leave a comment below. Thank you in advance!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nicecabbage.com/2009/09/accidental-server-down-and-so-sorry-for-that/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Check Syntax of Apache httpd.conf</title>
		<link>http://www.nicecabbage.com/2009/06/check-syntax-of-apache-httpdconf/</link>
		<comments>http://www.nicecabbage.com/2009/06/check-syntax-of-apache-httpdconf/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 14:22:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TechTips]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://www.nicecabbage.com/?p=30</guid>
		<description><![CDATA[Problem

I want to check my httpd.conf and its including files.

Solution

Try running httpd.exe with &#8220;-t&#8221; option.
]]></description>
			<content:encoded><![CDATA[<h2>Problem</h2>
<p>
I want to check my httpd.conf and its including files.
</p>
<h2>Solution</h2>
<p>
Try running httpd.exe with &#8220;-t&#8221; option.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nicecabbage.com/2009/06/check-syntax-of-apache-httpdconf/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
