<?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>Square MI &#187; Apache</title>
	<atom:link href="http://www.square-mi.com/wp/category/web%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.square-mi.com/wp</link>
	<description>oracle, php, java, etc... technical memo &#38; つれづれなこと</description>
	<lastBuildDate>Tue, 12 Feb 2013 12:22:08 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>apachectl status で、ステータスが表示されない</title>
		<link>http://www.square-mi.com/wp/246/apachectl-status-%e3%81%a7%e3%80%81%e3%82%b9%e3%83%86%e3%83%bc%e3%82%bf%e3%82%b9%e3%81%8c%e8%a1%a8%e7%a4%ba%e3%81%95%e3%82%8c%e3%81%aa%e3%81%84/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=apachectl-status-%25e3%2581%25a7%25e3%2580%2581%25e3%2582%25b9%25e3%2583%2586%25e3%2583%25bc%25e3%2582%25bf%25e3%2582%25b9%25e3%2581%258c%25e8%25a1%25a8%25e7%25a4%25ba%25e3%2581%2595%25e3%2582%258c%25e3%2581%25aa%25e3%2581%2584</link>
		<comments>http://www.square-mi.com/wp/246/apachectl-status-%e3%81%a7%e3%80%81%e3%82%b9%e3%83%86%e3%83%bc%e3%82%bf%e3%82%b9%e3%81%8c%e8%a1%a8%e7%a4%ba%e3%81%95%e3%82%8c%e3%81%aa%e3%81%84/#comments</comments>
		<pubDate>Mon, 29 Oct 2012 04:00:26 +0000</pubDate>
		<dc:creator>commerce</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Webサーバー]]></category>

		<guid isPermaLink="false">http://www.square-mi.com/wp/?p=246</guid>
		<description><![CDATA[でステータスが表示されなかったので、調査しました。 【環境】 CentOS 6.2 x86_64 Apache 2.2.15 The &#8216;links&#8217; package is required for &#8230; <a href="http://www.square-mi.com/wp/246/apachectl-status-%e3%81%a7%e3%80%81%e3%82%b9%e3%83%86%e3%83%bc%e3%82%bf%e3%82%b9%e3%81%8c%e8%a1%a8%e7%a4%ba%e3%81%95%e3%82%8c%e3%81%aa%e3%81%84/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<pre class="brush: bash; light: true; title: ; notranslate">$ apachectl status</pre>
<p>でステータスが表示されなかったので、調査しました。</p>
<p>【環境】<br />
CentOS 6.2 x86_64<br />
Apache 2.2.15</p>
<h4>The &#8216;links&#8217; package is required for this functionality.</h4>
<p><strong>apachectl</strong> スクリプトの中身を解析してみると、<strong>/usr/bin/links</strong> というコマンドがないため発生しているエラーのようです。/usr/bin/links とは何かを調べてみると <strong>elinks</strong> というテキストブラウザのことでした。</p>
<p>elinks をインストールします。</p>
<pre class="brush: bash; light: true; title: ; notranslate">$ yum -y install elinks</pre>
<p>インストール後再度</p>
<pre class="brush: bash; light: true; title: ; notranslate">$ apachectl status</pre>
<h4>The requested URL /server-status was not found on this server.</h4>
<p>やはり、上記エラーメッセージが表示されステータスは表示されません。</p>
<p>また調べてみると、httpd.conf の中に</p>
<pre class="brush: bash; light: true; title: ; notranslate">
#&lt;Location /server-status&gt;;
#  SetHandler server-status
#  Order deny,allow
#  Deny from all
#  Allow from .example.com
#&lt;/Location&gt;;
</pre>
<p>という記述が、コメントアウトされていました。 ということで、何も考えずにコメントを外し,</p>
<pre class="brush: bash; light: true; title: ; notranslate">$ apachectl status</pre>
<h4>You don&#8217;t have permission to access /server-status on this server.</h4>
<p>まだ、うまくいきません。</p>
<p>エラー文言も変わっていたので前回の修正部分を再度見直しました。 &#8220;.example.com&#8221; これは、明らかに変なので、localhost に修正しました。</p>
<pre class="brush: bash; light: true; title: ; notranslate">
&lt;Location /server-status&gt;
  SetHandler server-status
  Order deny,allow
  Deny from all
  Allow from localhost
&lt;/Location&gt;
</pre>
<pre class="brush: bash; light: true; title: ; notranslate">
$ apachectl status
Apache Server Status for localhost
Server Version: Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3
Server Built: Dec 8 2011 18:10:49
--------------------------------------------------------------------------
Current Time: Monday, 29-Oct-2012 12:13:43 JST
Restart Time: Monday, 29-Oct-2012 12:13:36 JST
Parent Server Generation: 5
Server uptime: 6 seconds
1 requests currently being processed, 7 idle workers

W_______........................................................
................................................................
................................................................
................................................................

Scoreboard Key:
&quot;_&quot; Waiting for Connection, &quot;S&quot; Starting up, &quot;R&quot; Reading Request,
&quot;W&quot; Sending Reply, &quot;K&quot; Keepalive (read), &quot;D&quot; DNS Lookup,
&quot;C&quot; Closing connection, &quot;L&quot; Logging, &quot;G&quot; Gracefully finishing,
&quot;I&quot; Idle cleanup of worker, &quot;.&quot; Open slot with no current process
</pre>
<p>正しくステータスが表示されたようです。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.square-mi.com/wp/246/apachectl-status-%e3%81%a7%e3%80%81%e3%82%b9%e3%83%86%e3%83%bc%e3%82%bf%e3%82%b9%e3%81%8c%e8%a1%a8%e7%a4%ba%e3%81%95%e3%82%8c%e3%81%aa%e3%81%84/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
