<?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>きなこもちのチロルチョコ普及委員会 &#187; Apache</title>
	<atom:link href="http://chiharaminori.com/archives/category/apache/feed" rel="self" type="application/rss+xml" />
	<link>http://chiharaminori.com</link>
	<description>「茅原実里」さんご本人、所属事務所等とは一切関係ありません。</description>
	<lastBuildDate>Sat, 03 Jul 2010 03:36:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>mod_geoip2 で国別フィルタリング</title>
		<link>http://chiharaminori.com/archives/526</link>
		<comments>http://chiharaminori.com/archives/526#comments</comments>
		<pubDate>Thu, 10 Aug 2006 11:39:57 +0000</pubDate>
		<dc:creator>TOSHI</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://chiharaminori.com/archives/526</guid>
		<description><![CDATA[国別フィルタを探してたらこんなの発見
MaxMind &#8211; GeoIP Apache API
GeoIPってホスト名 or IPアドレスの割り当てられている国を調べるツールを提供してるらしい。で、それを参照でき [...]]]></description>
			<content:encoded><![CDATA[<p>国別フィルタを探してたらこんなの発見<br />
<a title="MaxMind - GeoIP Apache API" href="http://www.maxmind.com/app/mod_geoip">MaxMind &#8211; GeoIP Apache API</a><br />
GeoIPってホスト名 or IPアドレスの割り当てられている国を調べるツールを提供してるらしい。で、それを参照できるようなApache用のmoduleがあると。</p>
<p>まずはmoduleインスコ。公開されてるソースがapache-2.0用と書いてあるので、2.2用に書き換えなと想ったけど、ソース覗いたらその必要はなさそうだったのでがっつんとportsからインスコ。httpd.confに書くのはmod_geoipのWeb参照して</p>
<blockquote><p>LoadModule&nbsp;geoip_module&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;modules/mod_geoip.so</p>
<p>&lt;IfModule&nbsp;geoip_module&gt;<br />GeoIPEnable&nbsp;On<br />GeoIPDBFile&nbsp;/path/to/GeoIP.dat</p>
<p>SetEnvIf&nbsp;GEOIP_COUNTRY_CODE&nbsp;US&nbsp;BlockCountry<br />SetEnvIf&nbsp;GEOIP_COUNTRY_CODE&nbsp;CN&nbsp;BlockCountry<br />SetEnvIf&nbsp;GEOIP_COUNTRY_CODE&nbsp;KR&nbsp;BlockCountry</p>
<p>Deny&nbsp;from&nbsp;env=BlockCountry<br />&lt;/IfModule&gt;</p></blockquote>
<p>SetEnvIfとかは別にVirtualHost下とか塞ぎたいところでええんでない。<br />
IPアドレス割り当てのDBは自前で持たなくちゃいけなくて、お金払うと市とかまで入った詳細や更新ツールが使えるようになったりするようだけど、そんな制度高くなくていいので(あくまでいらないところを通さなくするだけなので)、月1更新の公開DBをもってくることに。<a title="MaxMind - GeoLite Country | Open Source IP Address to Country Database" href="http://www.maxmind.com/app/geoip_country">GeoLite Country</a>にある国別DBをwgetするようcronに仕込むだけ。</p>
<p>想ったよりあっさり動いたので、さっそく<s>US/</s>CN/KRはdenyしますたｗ って想ったけど、USを閉じると色々他のサービスで弊害が出るので仕方なくallow。で、一番ひどいコメント(ついでにトラックバック)へのアクセスをJP以外開けないように変更。<br />
見えなくて困る人(そもそもそういう人はこのエントリーが見えてないと想うけど)は言ってくれれば、気分によっては何とかするかもしれないししないかもしれない。</p>
]]></content:encoded>
			<wfw:commentRss>http://chiharaminori.com/archives/526/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>apache 2.2.0</title>
		<link>http://chiharaminori.com/archives/413</link>
		<comments>http://chiharaminori.com/archives/413#comments</comments>
		<pubDate>Wed, 07 Dec 2005 03:17:50 +0000</pubDate>
		<dc:creator>TOSHI</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://chiharaminori.com/archives/413</guid>
		<description><![CDATA[portsにも早々に入ったけど、とりあえず手元で試してみようかということで突っ込んでみる。以下ぶちあたった問題点。
1. mod_encoding
まぁこれは予想通りだったんだけど。API変更の影響。regex.hがとい [...]]]></description>
			<content:encoded><![CDATA[<p>portsにも早々に入ったけど、とりあえず手元で試してみようかということで突っ込んでみる。以下ぶちあたった問題点。</p>
<p>1. mod_encoding<br />
まぁこれは予想通りだったんだけど。<a href="http://httpd.apache.org/docs/2.2/new_features_2_2.html#developer">API変更</a>の影響。regex.hがといわれてコンパイル通らなかったり、<a href="http://www.aconus.com/~oyaji/faq/apache_encoding.htm">GETでとる文字列にかかる問題の修正パッチ</a>を当てていたところでも関数が古くて引っかかった。<br />
最終的には、mod_encoding.c.apache2.20040616に<a href="http://masumin.maaya.jp/blog/archives/files/mod_encoding.c.patch">パッチ</a>(FreeBSD 6.0-STABLE環境。ヘッダファイルの場所とか適当に直して)を作ってコンパイルしてようやく動作。</p>
<p>2. <a href="http://httpd.apache.org/docs/2.2/ja/mod/core.html#acceptfilter">AcceptFilter</a></p>
<blockquote><p>[warn]&nbsp;(2)No&nbsp;such&nbsp;file&nbsp;or&nbsp;directory:&nbsp;Failed&nbsp;to&nbsp;enable&nbsp;the&nbsp;&#39;httpready&#39;&nbsp;Accept&nbsp;Filter.</p></blockquote>
<p>とかうっちぇーwarningが出る。どうも、2.1で追加された機能を動かしているらしく、わざわざそれ用のkernel moduleまで立ち上げろと言う(&#8217;A`)<br />
accf_data(SSL用),accf_httpのkernel moduleあげたら起動時は言われなくなったけど、gracefulやったら相変わらずうっさいので、この際noneに&#8230;</p>
<p>3. Directory設定<br />
付属のオリジナルサンプルのconfigでは</p>
<p>&lt;Directory&nbsp;/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;Order&nbsp;deny,allow<br />&nbsp;&nbsp;&nbsp;&nbsp;Deny&nbsp;from&nbsp;all<br />&lt;/Directory&gt;
<p>となっていてこのまま流用していて、上記だと勿論デフォルトdenyになっちゃうので、明示してあげない限り設定した全ディレクトリが見えなくなる罠。<br />
マニュアルでも<a href="http://httpd.apache.org/docs/2.2/ja/misc/security_tips.html#protectserverfiles">デフォルトdenyを推奨</a>していてconfigも準拠したんだろうということで、使うディレクトリで明示的にallow指定してあげることに。</p>
]]></content:encoded>
			<wfw:commentRss>http://chiharaminori.com/archives/413/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ApacheのUserDirを抑制</title>
		<link>http://chiharaminori.com/archives/318</link>
		<comments>http://chiharaminori.com/archives/318#comments</comments>
		<pubDate>Tue, 09 Aug 2005 08:27:02 +0000</pubDate>
		<dc:creator>TOSHI</dc:creator>
				<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://chiharaminori.com/archives/318</guid>
		<description><![CDATA[言われて気づいたわけですが、UserDirが全部のVirtualHostにまでかかってる!害はあんまないけど気持ち悪い&#8230;
テンプレのhttpd.confに適当に設定追加すると、大概その前に書いてあるUserD [...]]]></description>
			<content:encoded><![CDATA[<p>言われて気づいたわけですが、UserDirが全部のVirtualHostにまでかかってる!害はあんまないけど気持ち悪い&#8230;<br />
テンプレのhttpd.confに適当に設定追加すると、大概その前に書いてあるUserDirの設定がそのまま使われることが多い感じ。とりあえず、使わないVirtualHostに</p>
<blockquote><p>UserDir&nbsp;disabled</p></blockquote>
<p>書いて解決。</p>
]]></content:encoded>
			<wfw:commentRss>http://chiharaminori.com/archives/318/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mod_proxy+mod_encodingでのURIエンコーディング問題</title>
		<link>http://chiharaminori.com/archives/151</link>
		<comments>http://chiharaminori.com/archives/151#comments</comments>
		<pubDate>Tue, 21 Dec 2004 04:21:58 +0000</pubDate>
		<dc:creator>TOSHI</dc:creator>
				<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://chiharaminori.com/archives/151</guid>
		<description><![CDATA[keitaircのエントリではかなりはしょって書いてるけど、設定段階でかなり問題になったのがありまして。
mod_proxyを通したら何故かURIエンコードされたチャンネル名の先のURIを叩いても何も出てこないのですよ。 [...]]]></description>
			<content:encoded><![CDATA[<p>keitaircのエントリではかなりはしょって書いてるけど、設定段階でかなり問題になったのがありまして。<br />
mod_proxyを通したら何故かURIエンコードされたチャンネル名の先のURIを叩いても何も出てこないのですよ。例えばrecentみたいなエンコードされてないところは普通に見える。ProxyPass通さないで直接叩くと見える。なんでだ&#8230;</p>
<p>まずはURIエンコードする部分を疑ってエンコードされてる文字列をみるも、間違った様子はない。Jcode.pmがへくってるのかとおもい、入出力のコードを明示指定してあげても変わらず。さらにはどっかにあった、Base64エンコードしてしまう方法も試すが一緒。 ど う し た ら い い ん だ</p>
<p>いろいろ探した挙句、原因は&#8230;mod_encodingでした、はずしたら動いたよ(&#8217;A`)。ちょっと前に<a href="http://masumin.maaya.jp/blog/archives/000094.html">パッチ当てした</a>のになんで効いてないんだとよくよくパッチ見ると、?以降のquery_stringに対してのみ処理してあって、?含まないkeitaircのURIには意味ねぇ。んじゃどうしようかってことで。<br />
1. DAVステ(却下)<br />
2. mod_encodingステ(却下)<br />
3. DAV使うディレクトリだけ、EncodingEngine設定汁<br />
LocationやDirectory内でEncodingEngineの設定が出来ないから上記のパッチが出来てるのに回避策はあるのか?と想いきや、VirtualHost内だったら設定有効だったり。ということでDAVで使うSSL部分のみでEncodingEngineをonしますた。こんなんでいいのか..</p>
]]></content:encoded>
			<wfw:commentRss>http://chiharaminori.com/archives/151/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mod_encodingと他の日本語環境の問題</title>
		<link>http://chiharaminori.com/archives/94</link>
		<comments>http://chiharaminori.com/archives/94#comments</comments>
		<pubDate>Thu, 21 Oct 2004 02:54:28 +0000</pubDate>
		<dc:creator>TOSHI</dc:creator>
				<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://chiharaminori.com/archives/94</guid>
		<description><![CDATA[mod_encodingのことでぷらすと話していて私自身も調べていたら、こんなの発見。うちじゃ特に他のCGIなんかで不具合感じたことはないけどなぁ。と想いつつ、念のためパッチ当てて入れなおし。終了。
]]></description>
			<content:encoded><![CDATA[<p>mod_encodingのことでぷらすと話していて私自身も調べていたら、<a title="WebDAVの日本語対策でmod_encodingを導入すると、他のソフトの日本語環境やPHPやCGIで文字化けが発生する" href="http://www.aconus.com/~oyaji/faq/apache_encoding.htm">こんなの</a>発見。うちじゃ特に他のCGIなんかで不具合感じたことはないけどなぁ。と想いつつ、念のためパッチ当てて入れなおし。終了。</p>
]]></content:encoded>
			<wfw:commentRss>http://chiharaminori.com/archives/94/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>apache2祭り再び</title>
		<link>http://chiharaminori.com/archives/77</link>
		<comments>http://chiharaminori.com/archives/77#comments</comments>
		<pubDate>Tue, 28 Sep 2004 11:48:54 +0000</pubDate>
		<dc:creator>TOSHI</dc:creator>
				<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://chiharaminori.com/archives/77</guid>
		<description><![CDATA[つい10日ほど前にお目にかかった2.0.51が無かったことにされてる&#8230;(´・ω・｀)
portsからの以外全部2.0.52へ入れ替え。
]]></description>
			<content:encoded><![CDATA[<p>つい10日ほど前にお目にかかった2.0.51が無かったことにされてる&#8230;(´・ω・｀)<br />
portsからの以外全部2.0.52へ入れ替え。</p>
]]></content:encoded>
			<wfw:commentRss>http://chiharaminori.com/archives/77/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>apache2祭り</title>
		<link>http://chiharaminori.com/archives/73</link>
		<comments>http://chiharaminori.com/archives/73#comments</comments>
		<pubDate>Fri, 17 Sep 2004 03:23:41 +0000</pubDate>
		<dc:creator>TOSHI</dc:creator>
				<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://chiharaminori.com/archives/73</guid>
		<description><![CDATA[Webサーバー「Apache 2.0.x」にセキュリティ・ホール，最新版2.0.51にアップデートを : IT Pro ニュース
ということでごっそりapache2祭り。特にたいした変更も無くコンパイルして突っ込むだけ。 [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Webサーバー「Apache 2.0.x」にセキュリティ・ホール，最新版2.0.51にアップデートを : IT Pro ニュース" href="http://itpro.nikkeibp.co.jp/free/ITPro/NEWS/20040916/150043/">Webサーバー「Apache 2.0.x」にセキュリティ・ホール，最新版2.0.51にアップデートを : IT Pro ニュース</a><br />
ということでごっそりapache2祭り。特にたいした変更も無くコンパイルして突っ込むだけ。portsは2.0.50のまんまだけど、穴patchは適用っぽい。</p>
]]></content:encoded>
			<wfw:commentRss>http://chiharaminori.com/archives/73/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

