<?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>Masashi Blog &#187; Apache</title>
	<atom:link href="http://www.masashi.org/blog/category/software/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.masashi.org/blog</link>
	<description>日々の四方山話を徒然と･･･</description>
	<lastBuildDate>Fri, 03 Sep 2010 06:53:53 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Apache-2.2.15_9へアップグレードできない</title>
		<link>http://www.masashi.org/blog/2010/07/25/apache22/</link>
		<comments>http://www.masashi.org/blog/2010/07/25/apache22/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 09:49:42 +0000</pubDate>
		<dc:creator>Masashi</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[ports]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[FreeBSD 8.0-RELEASE]]></category>
		<category><![CDATA[portupgrade]]></category>

		<guid isPermaLink="false">http://www.masashi.org/blog/?p=1466</guid>
		<description><![CDATA[この前からapache-2.2.14_6をapache-2.2.15_9にportupgradeしようとしてエラーが出てうまくいかなかったのをApacheを止めたくないがために深く追求せずに放置したままになっていました。 [...]]]></description>
			<content:encoded><![CDATA[<p>この前からapache-2.2.14_6をapache-2.2.15_9にportupgradeしようとしてエラーが出てうまくいかなかったのをApacheを止めたくないがために深く追求せずに放置したままになっていました。今日は本腰を入れてこれを調べてみた。</p>
<p>エラーメッセージを見ると apr-1 パッケージに問題ありそうなことが分かったのでさくっと「apache apr-1」でぐぐってみたら「<a href="http://www.sanshouo.com/mt/2010/05/portupgradeapache-2215-9.html">portupgradeでapache- 2.2.15_9に更新できない</a>」というそのまんまの情報がみつかりました。感謝感謝。</p>
<p>その記事の内容を参考にしつつ、以下の作業でアップグレードに成功。<br />
まず、ざっくりとapache22と apr関係をアンインストール。私の環境では以下のとおり。</p>
<blockquote><p># pkg_delete -f apache-2.\*<br />
# pkg_delete -f apr-ipv6-devrandom-gdbm-db42-1.4.2.1.3.9_1</p></blockquote>
<p>次に/var/db/ports/apr のoptionsの内容をApache-2.2に合わせて変更。</p>
<blockquote><p>WITHOUT_THREADS=true<br />
WITHOUT_IPV6=true</p></blockquote>
<p>最後に、Apache-2.2を再びインストール。apr関係はportsの依存関係で勝手に入る。今回入ったのは apr-nothr-devrandom-gdbm-db42-1.4.2.1.3.9_1 だった。</p>
<blockquote><p># portinstall apache22</p></blockquote>
<p>これで完了。<br />
以下はports設定ファイルの備忘録</p>
<p># cat /var/db/ports/apr/options</p>
<blockquote><p>
# This file is auto-generated by &#8216;make config&#8217;.<br />
# No user-servicable parts inside!<br />
# Options for apr-ipv6-devrandom-gdbm-db42-1.4.2.1.3.9_1<br />
_OPTIONS_READ=apr-ipv6-devrandom-gdbm-db42-1.4.2.1.3.9_1<br />
WITHOUT_THREADS=true<br />
WITHOUT_IPV6=true<br />
WITH_BDB=true<br />
WITH_GDBM=true<br />
WITHOUT_LDAP=true<br />
WITHOUT_MYSQL=true<br />
WITHOUT_NDBM=true<br />
WITHOUT_PGSQL=true<br />
WITHOUT_SQLITE=true<br />
WITH_DEVRANDOM=true
</p></blockquote>
<p># cat /var/db/ports/apache22/options</p>
<blockquote><p>
# This file is auto-generated by &#8216;make config&#8217;.<br />
# No user-servicable parts inside!<br />
# Options for apache-2.2.15_9<br />
_OPTIONS_READ=apache-2.2.15_9<br />
WITHOUT_THREADS=true<br />
WITH_MYSQL=true<br />
WITHOUT_PGSQL=true<br />
WITHOUT_SQLITE=true<br />
WITHOUT_IPV6=true<br />
WITHOUT_BDB=true<br />
WITH_AUTH_BASIC=true<br />
WITH_AUTH_DIGEST=true<br />
WITH_AUTHN_FILE=true<br />
WITHOUT_AUTHN_DBD=true<br />
WITH_AUTHN_DBM=true<br />
WITH_AUTHN_ANON=true<br />
WITH_AUTHN_DEFAULT=true<br />
WITH_AUTHN_ALIAS=true<br />
WITH_AUTHZ_HOST=true<br />
WITH_AUTHZ_GROUPFILE=true<br />
WITH_AUTHZ_USER=true<br />
WITH_AUTHZ_DBM=true<br />
WITH_AUTHZ_OWNER=true<br />
WITH_AUTHZ_DEFAULT=true<br />
WITH_CACHE=true<br />
WITH_DISK_CACHE=true<br />
WITH_FILE_CACHE=true<br />
WITHOUT_MEM_CACHE=true<br />
WITH_DAV=true<br />
WITH_DAV_FS=true<br />
WITHOUT_BUCKETEER=true<br />
WITHOUT_CASE_FILTER=true<br />
WITHOUT_CASE_FILTER_IN=true<br />
WITHOUT_EXT_FILTER=true<br />
WITHOUT_LOG_FORENSIC=true<br />
WITHOUT_OPTIONAL_HOOK_EXPORT=true<br />
WITHOUT_OPTIONAL_HOOK_IMPORT=true<br />
WITHOUT_OPTIONAL_FN_IMPORT=true<br />
WITHOUT_OPTIONAL_FN_EXPORT=true<br />
WITHOUT_LDAP=true<br />
WITHOUT_AUTHNZ_LDAP=true<br />
WITH_ACTIONS=true<br />
WITH_ALIAS=true<br />
WITH_ASIS=true<br />
WITH_AUTOINDEX=true<br />
WITH_CERN_META=true<br />
WITH_CGI=true<br />
WITH_CHARSET_LITE=true<br />
WITHOUT_DBD=true<br />
WITH_DEFLATE=true<br />
WITH_DIR=true<br />
WITH_DUMPIO=true<br />
WITH_ENV=true<br />
WITH_EXPIRES=true<br />
WITH_HEADERS=true<br />
WITH_IMAGEMAP=true<br />
WITH_INCLUDE=true<br />
WITH_INFO=true<br />
WITH_LOG_CONFIG=true<br />
WITH_LOGIO=true<br />
WITH_MIME=true<br />
WITH_MIME_MAGIC=true<br />
WITH_NEGOTIATION=true<br />
WITH_REWRITE=true<br />
WITH_SETENVIF=true<br />
WITH_SPELING=true<br />
WITH_STATUS=true<br />
WITH_UNIQUE_ID=true<br />
WITH_USERDIR=true<br />
WITH_USERTRACK=true<br />
WITH_VHOST_ALIAS=true<br />
WITH_FILTER=true<br />
WITH_VERSION=true<br />
WITHOUT_PROXY=true<br />
WITHOUT_PROXY_CONNECT=true<br />
WITH_PATCH_PROXY_CONNECT=true<br />
WITHOUT_PROXY_FTP=true<br />
WITHOUT_PROXY_HTTP=true<br />
WITHOUT_PROXY_AJP=true<br />
WITHOUT_PROXY_BALANCER=true<br />
WITHOUT_PROXY_SCGI=true<br />
WITH_SSL=true<br />
WITHOUT_SUEXEC=true<br />
WITHOUT_SUEXEC_RSRCLIMIT=true<br />
WITH_REQTIMEOUT=true<br />
WITHOUT_CGID=true
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.masashi.org/blog/2010/07/25/apache22/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSL Certificates</title>
		<link>http://www.masashi.org/blog/2007/11/30/ssl-certificates/</link>
		<comments>http://www.masashi.org/blog/2007/11/30/ssl-certificates/#comments</comments>
		<pubDate>Fri, 30 Nov 2007 14:23:46 +0000</pubDate>
		<dc:creator>Masashi</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://www.masashi.org/blog/archives/388</guid>
		<description><![CDATA[今までSSLサイトを自己署名した俗に言う「オレオレ証明書」で運用していたのですが、最近安いSSL Certificates(SSL証明書)が利用できるようになってきたので使ってみました。安い証明書ということで色々調べると [...]]]></description>
			<content:encoded><![CDATA[<p>今までSSLサイトを自己署名した俗に言う「オレオレ証明書」で運用していたのですが、最近安いSSL Certificates(SSL証明書)が利用できるようになってきたので使ってみました。安い証明書ということで色々調べると<a href="http://www.namecheap.com/">NameCheap</a>が扱っている<a href="http://www.namecheap.com/learn/other-services/ssl-certificates.asp">RapidSSLが一番安い</a>みたいです。同じRapidSSLでも<a href="http://www.rapidssl.com/index_ssl.htm">本家だと年間69ドル</a>と高かったり、日本語で扱っている所で30ドルくらいしてます。NameCheapのは3年期限だと年間12.88ドルです。今回はとりあえずということで1年期限で14.88ドルで購入しました。購入手続きをするとSSL証明書取得のリンクがユーザーパネルに現れます。</p>
<p><span id="more-388"></span></p>
<p>まずは下準備。SSL化するドメイン名はwww.sagamiya.comです。秘密鍵(sagamiya.com.key)を作ります。apacheの起動の度にパスフレーズを入力するのを避けたかったのでパスフレーズ無しで作りました。</p>
<div class="igBar"><span id="lcode-4"><a href="#" onclick="javascript:showPlainTxt('code-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-4">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># cd /usr/local/etc/apache22</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># openssl genrsa -out sagamiya.<span style="">com</span>.<span style="">key</span> <span style="color:#800000;color:#800000;">1024</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># chmod <span style="color:#800000;color:#800000;">400</span> sagamiya.<span style="">com</span>.<span style="">key</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>これで-----BEGIN RSA PRIVATE KEY-----で始まり-----END RSA PRIVATE KEY-----　で終わる秘密鍵が生成されました。この秘密鍵はサーバー上から外には出さないようにします。rootにしか見えないように chmod 400 します。<br />
次に、この鍵とペアの公開鍵(sagamiya.com.csr)を作ります。<br />
この公開鍵の作成時に証明書に表示される情報の入力が求められます。</p>
<div class="igBar"><span id="lcode-5"><a href="#" onclick="javascript:showPlainTxt('code-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-5">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># openssl req -new -key sagamiya.<span style="">com</span>.<span style="">key</span> -out sagamiya.<span style="">com</span>.<span style="">csr</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">You are about to be asked to enter information that will be incorporated</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">into your certificate request.</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">What</span> you are about to enter is what is called a Distinguished Name or a DN.</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">There</span> are quite a few fields but you can leave some blank</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">For some fields there will be a default value,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">If you enter <span style="color:#CC0000;">'.'</span>, the field will be left blank.</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">-----</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Country Name <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">2</span> letter code<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>AU<span style="color:#006600; font-weight:bold;">&#93;</span>:←日本なら<span style="color:#CC0000;">"JP"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">State or Province Name <span style="color:#006600; font-weight:bold;">&#40;</span>full name<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>Some-State<span style="color:#006600; font-weight:bold;">&#93;</span>:Queensland ←日本なら都道府県名</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Locality Name <span style="color:#006600; font-weight:bold;">&#40;</span>eg, city<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span>:Gold Coast ←都市名</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Organization Name <span style="color:#006600; font-weight:bold;">&#40;</span>eg, company<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#91;</span>Internet Widgits Pty Ltd<span style="color:#006600; font-weight:bold;">&#93;</span>:Sagamiya.<span style="">com</span>　←組織名</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Organizational Unit Name <span style="color:#006600; font-weight:bold;">&#40;</span>eg, section<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span>:　←個人なのでブランク</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Common Name <span style="color:#006600; font-weight:bold;">&#40;</span>eg, YOUR name<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span>:www.<span style="">sagamiya</span>.<span style="">com</span>　←SSLで使用するFQDN</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Email Address <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span>:　←ブランク</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Please enter the following <span style="color:#CC0000;">'extra'</span> attributes</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">to be sent with your certificate request</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">A challenge password <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span>:　←ブランク</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">An optional company name <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span>:　←ブランク</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>-----BEGIN CERTIFICATE REQUEST-----で始まり-----END CERTIFICATE REQUEST-----で終わる公開鍵が生成されました。 "CERTIFICATE REQUEST"とある通り、認証局(CA)に署名してもらうためのファイルということです。</p>
<p>次に、SSL証明書の申し込みリンクをクリックするとこんな画面が現れます。</p>
<p><a class="imagelink" title="ssl1.jpg" rel="lightbox[pics]" href="http://www.masashi.org/blog/wp-content/uploads/2007/11/ssl1.jpg"><img id="image831" class="imageframe imgalignleft" src="http://www.masashi.org/blog/wp-content/uploads/2007/11/ssl1.thumbnail.jpg" alt="ssl1.jpg" width="200" height="197" /></a><br />
Select web serverでサーバーの種類を選びます。私の場合は"Apache + MOD SSL"を選びました。そして、Enter csrの窓に先程生成した公開鍵をコピペします。<br />
そして"Next"ボタンを押すと次の画面になります。</p>
<p><a class="imagelink" title="ssl2.jpg" rel="lightbox[pics]" href="http://www.masashi.org/blog/wp-content/uploads/2007/11/ssl2.jpg"><img id="image832" class="imageframe imgalignleft" src="http://www.masashi.org/blog/wp-content/uploads/2007/11/ssl2.thumbnail.jpg" alt="ssl2.jpg" width="180" height="200" /></a><br />
コピペした公開鍵の内容とドメイン名のドメイン名やwhoisの情報からAPPROVERのe-mailアドレス候補が表示されています。内容を確認してメールアドレスを選択して"Next"ボタンを押します。</p>
<p><a class="imagelink" title="ssl3.jpg" rel="lightbox[pics]" href="http://www.masashi.org/blog/wp-content/uploads/2007/11/ssl3.jpg"><img id="image833" class="imageframe imgalignleft" src="http://www.masashi.org/blog/wp-content/uploads/2007/11/ssl3.thumbnail.jpg" alt="ssl3.jpg" width="200" height="192" /></a></p>
<p>この画面ではSSL証明書の担当者の情報を入力します。 終わったら"Submit Order"ボタンを押します。</p>
<p><a class="imagelink" title="ssl4.jpg" rel="lightbox[pics]" href="http://www.masashi.org/blog/wp-content/uploads/2007/11/ssl4.jpg"><img id="image834" class="imageframe imgalignleft" src="http://www.masashi.org/blog/wp-content/uploads/2007/11/ssl4.thumbnail.jpg" alt="ssl4.jpg" width="200" height="194" /></a></p>
<p>この画面で公開鍵に署名してもらうための申し込みが完了です。すぐにドメイン名のAdministratorのメールアドレス宛に下記のようなメールが届きます。何某からSSL証明書の署名の要求が来たがドメイン名の管理者としてこれを許可するかどうかの確認です。</p>
<p><a class="imagelink" title="ssl5.jpg" rel="lightbox[pics]" href="http://www.masashi.org/blog/wp-content/uploads/2007/11/ssl5.jpg"><img id="image838" class="imageframe imgalignleft" src="http://www.masashi.org/blog/wp-content/uploads/2007/11/ssl5.thumbnail.jpg" alt="ssl5.jpg" width="124" height="200" /></a><br />
私の場合、署名の要求者とドメイン名の管理者が同じ人なので問題ありません。メールにあるリンク先にアクセスしてAPPROVE（承認します）ボタンを押します。</p>
<p><a class="imagelink" title="ssl6.jpg" rel="lightbox[pics]" href="http://www.masashi.org/blog/wp-content/uploads/2007/11/ssl6.jpg"><img id="image835" class="imageframe imgalignleft" src="http://www.masashi.org/blog/wp-content/uploads/2007/11/ssl6.thumbnail.jpg" alt="ssl6.jpg" width="200" height="197" /></a></p>
<p><a class="imagelink" title="ssl7.jpg" rel="lightbox[pics]" href="http://www.masashi.org/blog/wp-content/uploads/2007/11/ssl7.jpg"><img id="image836" class="imageframe imgalignleft" src="http://www.masashi.org/blog/wp-content/uploads/2007/11/ssl7.thumbnail.jpg" alt="ssl7.jpg" width="200" height="105" /></a></p>
<p>これでしばらくすると-----BEGIN CERTIFICATE-----で始まり-----END CERTIFICATE-----で終わる形式の署名済みの証明書がメールが届きます。この証明書の部分をsagamiya.com.crtという名前の ファイルにコピペします。</p>
<p>これでSSL証明書が取得できました。あとは秘密鍵と同じ場所に証明書を置いて chmod 400 し、ApacheのSSL設定をすればOKです。私の環境では 今まで「オレオレ証明書」でSSLを動かしていたので/usr/local/etc/apache22/extra/httpd-ssl.conf の下記の部分を編集してApacheをリスタートするだけで完了です。</p>
<div class="igBar"><span id="lcode-6"><a href="#" onclick="javascript:showPlainTxt('code-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-6">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">SSLCertificateFile /usr/local/etc/apache22/sagamiya.<span style="">com</span>.<span style="">crt</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">SSLCertificateKeyFile /usr/local/etc/apache22/sagamiya.<span style="">com</span>.<span style="">key</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.masashi.org/blog/2007/11/30/ssl-certificates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD (phpMyAdmin)</title>
		<link>http://www.masashi.org/blog/2006/12/19/freebsd-phpmyadmin/</link>
		<comments>http://www.masashi.org/blog/2006/12/19/freebsd-phpmyadmin/#comments</comments>
		<pubDate>Tue, 19 Dec 2006 13:38:49 +0000</pubDate>
		<dc:creator>Masashi</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.masashi.org/blog/archives/205</guid>
		<description><![CDATA[/usr/ports/databases/phpmyadmin
本家はここ。　過去に日本語版を配布していたサイトはここ。
MySQLサーバーのwebインターフェース。
PLAIN TEXT





# cd /usr/ [...]]]></description>
			<content:encoded><![CDATA[<p>/usr/ports/databases/phpmyadmin</p>
<p>本家は<a href="http://www.phpmyadmin.net/">ここ</a>。　過去に日本語版を配布していたサイトは<a href="http://www.trustbee.com/phpMyAdmin-jp/">ここ</a>。</p>
<p>MySQLサーバーのwebインターフェース。</p>
<div class="igBar"><span id="lcode-11"><a href="#" onclick="javascript:showPlainTxt('code-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-11">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># cd /usr/ports/databases/phpmyadmin</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># portinstall </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>でOK。</p>
<div class="igBar"><span id="lcode-12"><a href="#" onclick="javascript:showPlainTxt('code-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-12">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># /usr/local/www/phpMyAdmin</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># cp ./libraries/config.<span style="">default</span>.<span style="">php</span> config.<span style="">inc</span>.<span style="">php</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>でconfig.inc.phpを編集。最低限下記で動かせます。</p>
<div class="igBar"><span id="lcode-13"><a href="#" onclick="javascript:showPlainTxt('code-13'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-13">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$cfg<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC0000;">'PmaAbsoluteUri'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#CC0000;">'https://URL/ほげほげ'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$cfg<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC0000;">'Servers'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span>$i<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC0000;">'port'</span><span style="color:#006600; font-weight:bold;">&#93;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = <span style="color:#CC0000;">'3306'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$cfg<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC0000;">'Servers'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span>$i<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC0000;">'password'</span><span style="color:#006600; font-weight:bold;">&#93;</span>&nbsp; &nbsp; &nbsp; = <span style="color:#CC0000;">'(mysqlのrootのパスワード)'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$cfg<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC0000;">'DefaultLang'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#CC0000;">'ja'</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>https://URL/ほげほげでアクセスしたいので、/usr/local/etc/apache22/extra/http-ssl.confに下記追記。</p>
<div class="igBar"><span id="lcode-14"><a href="#" onclick="javascript:showPlainTxt('code-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-14">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Alias /ほげほげ <span style="color:#CC0000;">"/usr/local/www/phpMyAdmin"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">AllowOverride All</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Options FollowSymLinks ExecCGI Includes</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Allow from All </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>当然、/usr/local/www/phpMyAdminに.htaccessを置いてベーシック認証をかけるべし。</p>
<p>参考リンク：　<a href="http://www.futurism.ws/server/phpMyAdmin/">phpMyAdmin 設置手順</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.masashi.org/blog/2006/12/19/freebsd-phpmyadmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD (Webmin)</title>
		<link>http://www.masashi.org/blog/2006/12/19/freebsd-webmin/</link>
		<comments>http://www.masashi.org/blog/2006/12/19/freebsd-webmin/#comments</comments>
		<pubDate>Tue, 19 Dec 2006 12:27:07 +0000</pubDate>
		<dc:creator>Masashi</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://www.masashi.org/blog/archives/204</guid>
		<description><![CDATA[/usr/ports/sysutils/webmin
Webmin 1.310をインストール。
PLAIN TEXT





# cd /usr/ports/sysutils/webmin


# portinstal [...]]]></description>
			<content:encoded><![CDATA[<p>/usr/ports/sysutils/webmin</p>
<p>Webmin 1.310をインストール。</p>
<div class="igBar"><span id="lcode-18"><a href="#" onclick="javascript:showPlainTxt('code-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-18">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># cd /usr/ports/sysutils/webmin</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># portinstall </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>終わったら、rc.confに　webmin_enable="YES"　を追記。</p>
<div class="igBar"><span id="lcode-19"><a href="#" onclick="javascript:showPlainTxt('code-19'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-19">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># /usr/local/lib/webmin/setup.<span style="">sh</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>でセットアップ。sslを選ぶ。ポートはデフォの10000。</p>
<div class="igBar"><span id="lcode-20"><a href="#" onclick="javascript:showPlainTxt('code-20'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-20">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># /usr/local/etc/rc.<span style="">d</span>/webmin start </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>で起動。</p>
<p>ブラウザで https:ほげほげ:10000 でアクセスできるはず。<br />
参考リンク: <a href="http://jp.webmin.com/modules/newbb/">日本Webminユーザー会公式Webページ</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.masashi.org/blog/2006/12/19/freebsd-webmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>サーバーの引越し</title>
		<link>http://www.masashi.org/blog/2006/12/18/%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%81%ae%e5%bc%95%e8%b6%8a%e3%81%97/</link>
		<comments>http://www.masashi.org/blog/2006/12/18/%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%81%ae%e5%bc%95%e8%b6%8a%e3%81%97/#comments</comments>
		<pubDate>Mon, 18 Dec 2006 14:56:21 +0000</pubDate>
		<dc:creator>Masashi</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.masashi.org/blog/archives/203</guid>
		<description><![CDATA[このブログのサーバーを引越ししました。
その際にブログのURLを http://www.masashi.org/blog/ として新サーバーにWordpressをインストール。旧サーバーからDBをエクスポートしてURLの [...]]]></description>
			<content:encoded><![CDATA[<p>このブログのサーバーを引越ししました。</p>
<p>その際にブログのURLを http://www.masashi.org/blog/ として新サーバーにWordpressをインストール。旧サーバーからDBをエクスポートしてURLの部分を修正し、新サーバーにインポートしたのだけど、httpdが、</p>
<div class="igBar"><span id="lcode-22"><a href="#" onclick="javascript:showPlainTxt('code-22'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-22">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Request exceeded the limit of <span style="color:#800000;color:#800000;">10</span> internal redirects due to probable configuration error. <span style="">Use</span> <span style="color:#CC0000;">'LimitInternalRecursion'</span> to increase the limit if necessary.</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">Use</span> <span style="color:#CC0000;">'LogLevel debug'</span> to get a backtrace. </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>というエラーを吐くようになった。httpd.confに LimitInternalRecursion 100  とか設定すると頻度は減るのだがそれでもエラーは消えない。値を250にしてみたがそれでも時々出てくる。どうにもよく分からないので元のURLでそのままアクセスできるように設定変更してみたら何故かエラーが消えた。</p>
<p>とりあえず結果オーライだけど、うーん、謎。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.masashi.org/blog/2006/12/18/%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%81%ae%e5%bc%95%e8%b6%8a%e3%81%97/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD (apcupsd)</title>
		<link>http://www.masashi.org/blog/2006/12/05/freebsd-apcupsd/</link>
		<comments>http://www.masashi.org/blog/2006/12/05/freebsd-apcupsd/#comments</comments>
		<pubDate>Mon, 04 Dec 2006 15:28:48 +0000</pubDate>
		<dc:creator>Masashi</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[apcupsd]]></category>

		<guid isPermaLink="false">http://www.masashi.org/blog/archives/200</guid>
		<description><![CDATA[/usr/ports/sysutils/apcupsd
言わずと知れたUPSのコントロールソフト。
PLAIN TEXT





# cd /usr/ports/sysutils/apcupsd


# portins [...]]]></description>
			<content:encoded><![CDATA[<p>/usr/ports/sysutils/apcupsd</p>
<p>言わずと知れたUPSのコントロールソフト。</p>
<div class="igBar"><span id="lcode-26"><a href="#" onclick="javascript:showPlainTxt('code-26'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-26">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># cd /usr/ports/sysutils/apcupsd</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># portinstall </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Options選択はCGIとSNMPにX印を入れて続行。</p>
<p>終わったら/usr/local/etc/apcupsdでapcupsd.confの作成</p>
<p>今回はapcupsd.conf.net-master.sampleをapcupsd.confにコピーして編集する。一台だけの独立したサーバーなのでスタンドアローンの設定にするだけにする。バッテリーの保持時間とかの細かな設定は後回し。SMART-UPS 700にDELLのSC430のシリアル接続。</p>
<div class="igBar"><span id="lcode-27"><a href="#" onclick="javascript:showPlainTxt('code-27'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-27">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># diff apcupsd.<span style="">conf</span> apcupsd.<span style="">conf</span>.<span style="">net</span>-master.<span style="">sample</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">5</span>,7c5,<span style="color:#800000;color:#800000;">7</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;UPSCABLE smart</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;UPSTYPE apcsmart</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;DEVICE /dev/ttyd0</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">---</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;gt; UPSCABLE <span style="color:#800000;color:#800000;">940</span>-1524C</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;gt; UPSTYPE smartups</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;gt; DEVICE /dev/usv</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">21</span>,22c21,<span style="color:#800000;color:#800000;">22</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;UPSCLASS standalone</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;UPSMODE disable</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">---</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;gt; UPSCLASS netmaster</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;gt; UPSMODE net </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>/etc/rc.confに下記追記</p>
<div class="igBar"><span id="lcode-28"><a href="#" onclick="javascript:showPlainTxt('code-28'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-28">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># apcupsd</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">apcupsd_enable=<span style="color:#CC0000;">"YES"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">apcupsd_program=<span style="color:#CC0000;">"/usr/local/sbin/apcupsd"</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>rehashして/usr/local/etc/rc.d/apcupsd  startで起動。</p>
<p>/usr/local/etc/apcupsd/cgi下を/usr/local/www/apache22/cgi-binにapcupsdディレクトリを作ってコピー。</p>
<p>http://www.ほげほげ/cgi-bin/apcupsd/multimon.cgi でUPSの状態を見れるようにする。</p>
<p>今度のサーバーのUPSはSMART-UPS 700を使っているが、温度が４０℃を超えている。長寿命バッテリーを奮発したとは言え夏場の高温での劣化が今から心配。手元のサーバーのUPSはSMART-UPS 2200で約３０℃。筐体の余裕の違いだろうなぁ。。。</p>
<p>参考URL <a href="http://d.hatena.ne.jp/sillywalk7/20061021">1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.masashi.org/blog/2006/12/05/freebsd-apcupsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD (Squirrelmail)</title>
		<link>http://www.masashi.org/blog/2006/12/04/freebsd-squirrelmail/</link>
		<comments>http://www.masashi.org/blog/2006/12/04/freebsd-squirrelmail/#comments</comments>
		<pubDate>Mon, 04 Dec 2006 04:52:36 +0000</pubDate>
		<dc:creator>Masashi</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Squirrelmail]]></category>
		<category><![CDATA[imap]]></category>

		<guid isPermaLink="false">http://www.masashi.org/blog/archives/199</guid>
		<description><![CDATA[/usr/ports/mail/squirrelmail
以前は/user/ports/japanese/に日本語版が置いてあったが今はここのみに置いてあるみたい。
日本語版本家では1.4.5で止まっているけど、port [...]]]></description>
			<content:encoded><![CDATA[<p>/usr/ports/mail/squirrelmail</p>
<p>以前は/user/ports/japanese/に日本語版が置いてあったが今はここのみに置いてあるみたい。</p>
<p><a href="http://www.squirrelmail.jp/">日本語版本家</a>では1.4.5で止まっているけど、portsのは1.4.8。とりあえずportsで入れてみる。</p>
<div class="igBar"><span id="lcode-36"><a href="#" onclick="javascript:showPlainTxt('code-36'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-36">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># cd /usr/ports/mail/squirrelmail</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># portinstall </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>その後、/usr/local/www/squirrelmailに降りて、</p>
<div class="igBar"><span id="lcode-37"><a href="#" onclick="javascript:showPlainTxt('code-37'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-37">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># cd /usr/local/www/squirrelmail</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># ./configure </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>で各種設定を行う。</p>
<p>日本語を使うなら、 メニュー10番目のLanguageの所を</p>
<div class="igBar"><span id="lcode-38"><a href="#" onclick="javascript:showPlainTxt('code-38'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-38">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Language preferences</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">1</span>.&nbsp; <span style="">Default</span> Language&nbsp; &nbsp; &nbsp; &nbsp;: ja_JP</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">2</span>.&nbsp; <span style="">Default</span> Charset&nbsp; &nbsp; &nbsp; &nbsp; : iso-<span style="color:#800000;color:#800000;">2022</span>-jp</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">3</span>.&nbsp; <span style="">Enable</span> lossy encoding&nbsp; : false </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>でOK。あと、メニュー2番目のServer SettingsでIMAPサーバーを選択すれば使えるようになります。ウチはuw IMAPなのでこんな感じ。</p>
<div class="igBar"><span id="lcode-39"><a href="#" onclick="javascript:showPlainTxt('code-39'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-39">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">IMAP Settings</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">--------------</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">4</span>.&nbsp; <span style="">IMAP</span> Server&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : localhost</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">5</span>.&nbsp; <span style="">IMAP</span> Port&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : <span style="color:#800000;color:#800000;">143</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">6</span>.&nbsp; <span style="">Authentication</span> type&nbsp; &nbsp; : cram-md5</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">7</span>.&nbsp; <span style="">Secure</span> IMAP <span style="color:#006600; font-weight:bold;">&#40;</span>TLS<span style="color:#006600; font-weight:bold;">&#41;</span>&nbsp; &nbsp; &nbsp; : false</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">8</span>.&nbsp; <span style="">Server</span> software&nbsp; &nbsp; &nbsp; &nbsp; : uw</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">9</span>.&nbsp; <span style="">Delimiter</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : detect </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>あとは、適当に好みで。</p>
<p>apacheの設定は、SSLで使いたかったのでIncludesに置いたhttpd-ssl.confに下記を追記。</p>
<div class="igBar"><span id="lcode-40"><a href="#" onclick="javascript:showPlainTxt('code-40'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-40">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;code&gt;Alias /webmail <span style="color:#CC0000;">"/usr/local/www/squirrelmail"</span>&lt;/code&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">AllowOverride All</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Options FollowSymLinks ExecCGI Includes</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Allow from All </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>これで https://wwwほげほげ/webmail で使えるようになる。<br />
ところが、 返信とかすると下記のようなウォーニングが。</p>
<div class="igBar"><span id="lcode-41"><a href="#" onclick="javascript:showPlainTxt('code-41'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-41">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Warning: preg_split<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> expects parameter <span style="color:#800000;color:#800000;">4</span> to be long, string given in /usr/local/www/squirrelmail/functions/imap_messages.<span style="">php</span> on line 808Warning: Invalid argument supplied for foreach<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> in/usr/local/www/squirrelmail/functions/mime.<span style="">php</span> on line <span style="color:#800000;color:#800000;">52</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>ぐぐってみたらパッチ発見。</p>
<p><a href="http://www.hmailserver.com/forum/viewtopic.php?p=37884&amp;sid=e69aeabd487dd3d7d79ee92486859050" onclick="return top.js.OpenExtLink(window,event,this)" target="_blank">http://www.hmailserver.com/forum/viewtopic....</a></p>
<p style="direction: ltr"><a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1543573&amp;group_id=311&amp;atid=100311" onclick="return top.js.OpenExtLink(window,event,this)" target="_blank">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1543573.....</a></p>
<div class="igBar"><span id="lcode-42"><a href="#" onclick="javascript:showPlainTxt('code-42'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite">
<div id="code-42">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># diff imap_messages.<span style="">php</span>.<span style="">org</span> imap_</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">messages.<span style="">php</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">808c808</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;lt;$flags = preg_split<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">'/ /'</span>, $regs<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#800000;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#93;</span>,-<span style="color:#800000;color:#800000;">1</span>,<span style="color:#CC0000;">'PREG_SPLIT_NI_EMPTY'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">---</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B; font-weight:bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$flags = preg_split<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">'/ /'</span>, $regs<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#800000;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#93;</span>,-<span style="color:#800000;color:#800000;">1</span>,PREG_SPLIT_NO_EMPTY<span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>これで解決。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.masashi.org/blog/2006/12/04/freebsd-squirrelmail/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
