...

RaspberryPi 監視カメラの可能性:出席確認

by user

on
Category: Documents
35

views

Report

Comments

Transcript

RaspberryPi 監視カメラの可能性:出席確認
平成 26 年度卒業研究論文
RaspberryPi 監視カメラの可能性:出席確認
近畿大学工学部
情報システム工学科 情報メディアコース
和泉大介
学籍番号:1010960070
目次
1..研究の背景と目的
1.1 RaspberryPi とは
1.1.1 RaspberryPi のハードウェア
1.1.2 RaspberyyPi のソフトウェア
1.1.3 RaspberryPi を windows でリモート操作する
1.2 RaspberryPi の実用例
2. RaspberryPi を使う上で知っておきたい知識
2.1 sudo
2.1.1 sudo のリスクとメリット
2.2 パッケージマネージャー
2.2.1 パッケージマネージャに必要な要素
2.3 IoT
2.3.1 IoT とは
2.3.2 RFID とは
3. システム設計
4 環境構築
4.1 CGI の導入
4.1.1 Apache の設定
4.1.2 CGI
5 機能
5.1 動作を確認し自動撮影
5.2 ブラウザで現在の撮影状況を確認
5.3 ブラウザで撮影した画像確認
6.まとめ・考察
7.謝辞
8. 参考文献・引用
9. 付録(ソースコード)
1. 研究背景と目的
インターネット利用者が日本の人口の 80%となっている現在,世代を問わず PC が必要不可欠
になっている.それに伴いパソコンの値段は下がりインターネットを利用するのであれば 5 万円
あれば充分なスペックのものが手に入るようになた.しかし,中高生が自分で購入するには高す
ぎる値段なのには変わりない.RaspberryPi はそういった PC でプログラミング制御したい人など,
高すぎて自分専用の PC が手に入らないといった人や,研究などで PC に色んなものをダウロー
ドした事で今の開発環境に悪影響を及ぼしたくない人にはうれしいハードウェアである.その安
価な PC を使って役に立つものはできないかと考えこの研究に取り組んだ.
今回研究する目的として,近畿大学の研究室は教授とゼミ生の部屋が別れていることが多いた
め教授がゼミ生の出席状況を自分の研究室にいながら把握するのはできない現状である.よって
RaspberryPi の機能を生かしてブラウザを使ってリアルタイムでゼミ生のいる研究室の状況を把握
できれば教授の研究の妨げにならないようになるのではないかと考え出席・活動確認という点に
着目した.
1.1 RaspberryPi の概要
RaspberryPi(ラズベリーパイ)とは,ケンブリッジ大学のエンジニアの人達が制作したもので,
低コストであり,クレジットカードサイズのコンピュータである.スクラッチや Python のよう
な言語でのプログラミング方法を学ぶためすべての年齢の人が使える小さなデバイスである.
RaspberryPi はインターネット閲覧や高精細ビデオの再生から,表計算,ワープロ,ゲーム作成ま
で,デスクトップパソコンができるすべて事が出来る.
図 1 RaspberryPi 接続前
[5]
図 2 RaspberryPi 接続後[6]
1 電源・2 HDMI・3 ランケーブル・4USB・5 SD カード(図 3)
図 3 接続場所を数字に見立てたもの
1.1.1 RaspberryPi のハードウェア
RaspberryPi は CPU プロセッサコアとして 700 MHz の ARM1176JZF-S、GPU に VideoCore IV、
当初出荷分は 256MB、後の出荷分は 512MB に増量した DRAM を内蔵した Broadcom BCM2835
SoC を搭載している[10].Soc(System-on-a-chip)とは,ある装置やシステムの動作に必要な機能の
すべてを、一つの半導体チップに実装する方式[11]のことで,RaspberryPi に搭載されている Soc の
BCM2835 の性能はコストを重視したスマートフォン程度である.
1.1.2 RaspberryPi の OS
RaspberryPi の OS には Linux を使用して走らせる事を意図しているため,Debian をカスタムし
た Raspbian の仕様が推薦されている[10].Raspbian の他の OS との違いとして,RaspberryPi を使用
している人達が簡単にインストールできるようコンパイルされた 35000 以上のパッケージが付属
されているという点がある[7].
1.1.3 RaspberryPi を windows でリモート操作する
RaspberryPi を windows でリモートそうするまでの過程として,
1・RaspberryPi の LXTerminal で「ifconfig」の命令を行うことによって RaspberryPi の IP アドレス
を確認する.
2・先ほどと同じく LXTerminal を使い「sudo apt-get install xrdp」という命令を実行し RaspberryPi
に xrdp をインストールする.xrdp とは,RDP(Remote Desktop Protocol)プロトコルのフリーかつ
オープンソースのサーバーである.[9]
3・windows にはじめから搭載されているリモートデスクトップを使い過程 1 で確認した IP アド
レスを入力する(図 4).
図 4 リモートデスクトップ Windows での設定画像[8]
4・リモート接続確認の注意が出てくるのではいを選択する(図 5).
図 5 リモート接続許可の確認画面[8]
5・RaspberryPi のアカウント名とパスワード入力画面が出てくるので入力する(図 6).
図 6 Windows でリモート接続した RaspberryPi のログイン画面[8]
6・RaspberryPi のホーム画面が確認できれば接続成功である(図 7).
図 7 RaspberryPi をリモート接続した Windows の画面[8]
1.2 RaspberryPi の実用例
・天気ステーション
RaspberryPi を使って降雨から風速まですべて記録するように RaspberryPi にプログラムできる.
そこからさらに,気象情報を掲載したウェブサイトを自動的に更新するように RaspberryPi をプ
ログラムすることも可能である.
・デジタルフォトフレーム
家電量販店で高価なデジタルフォトフレームを買う代わりに,半分のコストで 2 倍の機能を持
つ製品を RaspberryPi で作ることができる.機能としては,写真だけでなく動画,音楽,天気予
報なども表示可能である.
2. RaspberryPi を使う上で知っておきたい知識
2.1 sudo
RaspberryPi を使う上で LXterminal という RaspberryPi にソフトウェアをインストールさせたり,
そのソフトウェアをアップデートする為に必要なコマンドプロンプトがあり,その LXterminal を
使う際,命令の最初にほとんどの場合 sudo を使っていたので気になり調べるに到った.
2.1.1 sudo のリスクとメリット[3]
パソコンのセキュリティ上 root 権限または root パスワードを一般ユーザーに与えるのは大変危
険なことである.しかし,正当な理由があって root 権限下での処理を実行する必要に迫られた一
般ユーザーが出てきた場合はどうすればいいか.そうした問題には非常に簡単に解決できる方法
がある.sudo を使えば,root パスワードを公開することなくアクセス範囲を最小限化した上で必
要な権限を一般ユーザーに与えることができるのである.
sudo(superuser do の略)は,管理権限を制限付きでほかのユーザーに与えるためのプログラム
で,実際これで許可される権限では事前の指定範囲内のコマンドしか行えないようになっている.
また sudo で行われる操作はすべてオーディットトレール(追跡記録)に残されるので,仮にこ
うしたユーザーが何らかの方法で権限外の処理を行ったとしても,システム管理者がログ記録を
確認すれば問題点の特定と修正が行えるはずである.そのほかに sudo 設定を介して複数のホス
トに与える権限を中央管理するという使い方も可能である.
sudo のインストールおよびホストの設定が完了すると,指定されたユーザーは「sudo
aForbiddenCommand」という構文を用いることで,新たに許可された範囲のコマンドを実行でき
るようになる.sudo の実行には root 用とは別のパスワード入力が必要とされているが,これは端
末から目を離した隙に第三者が不正使用することを防止するための措置である.また sudo によ
り本来の権限を越えた操作を許されたユーザーであっても,各自の欲しいままにシステムを自由
に操作できるという訳ではなく,あくまでシステム管理者が sudo 設定で許可した範囲内でしか
コマンドを実行できないため,システムがダメージを受けるリスクは最小限化できると考えられ
る.
sudo の設定で注意すべき点は,想定の範囲外の権限を与えないようにすることである.当然な
がら su の実行を許してしまうと,実質的にそのユーザーに root 権限を与えたのと同じになる.
ある意味こうしたものは明白な設定ミスと見なせなくもないが,それよりも厄介なのは,ある程
度の経験を積まないと気づきにくい形で小さな罠が隠されていることである.例えば「sudo
less」を実行できるユーザーがコマンドを使うと,そのほかのコマンドを root 権限で実行可能と
なってしまう場合がある.いずれにせよコマンドへのアクセス設定に関しては慎重な姿勢で対処
するのが重要であり,SANS Institute などのセキュリティ問題を扱ったサイトを参考にして,こ
の種類のリスクにおいてどのような脆弱性や手口が確認されているかをチェックしておくべきで
ある.
そのほかに犯しやすい単純なミスとしてコマンドを相対パスで指定するというものがあり,あ
る程度の知識を有すユーザーであれば,これを糸口にしてすべての権限を取得されかねない.例
えば FOO というエイリアスに bin/foo と設定したとしよう.その状況下においてあるユーザーが
適当な場所に bin ディレクトリを作成して,その中に自分が実行したいコマンドを格納しておく
と(ここでの重要なポイントはその名称を foo としておくこと),これを root 権限下で実行する
ことであらゆる操作が行えるようになってしまう事がある.
残念ながら,一般のユーザーがいわゆる特権昇格(privilege escalation)を行う手口を見つけて
不正に root 権限を取得してしまうような事態はあり得ないと保証することはできないのだが,特
定ユーザーにのみ上位のアクセス権限を必要とする一部の操作だけを許可するという処理を簡単
に実行できる現実的な手法は,sudo のほかに存在していないのである.
このように sudo の使用にはある程度のリスクが伴うが(その大部分は設定時のミスで余分な
権限まで与えることに関連している),指定ユーザーに通常以上の権限を与えて特定タスクの実
行を許すといった柔軟なシステム運用を可能にしてくれる存在という点には間違いがないといえ
る.
2.2 パッケージマネージャー
パッケージマネージャとは、コンピュータに何のソフトウェアがインストールされたかを記録
し、新しいソフトウェアのインストール・新しいバージョンへのソフトウェアの更新・以前イン
ストールしたソフトウェアの削除を容易に行えるようにするプログラムである。名前が示すよう
に、パッケージマネージャはパッケージを取り扱うということである。パッケージとは、ファイ
ル群を一つにし、インストールや削除をまとめてできるようにしたものである。RaspberryPi の
アップデートを行う際に,パッケージマネージャーが使用されているため,調べるに到った.
2.2.1 パッケージマネージャに必要な要素[4]
・パッケージマネージャに必要な要素としてパッケージのバージョン管理
・パッケージをそろえる事で同じ環境が再現できる.
・パッケージのインストール/アンインストール
・パッケージのアップグレード/ダウングレード
・パッケージ間の依存関係の管理
まず,パッケージのバージョン管理について,パッケージと呼ばれる単位に何らかのバージョ
ン識別子をつけて,中身を細かく比べることなく更新を知ることができるようにする.もしバー
ジョンの概念がないと,git や svn(Subversion)のような管理システムなしにソースコードを管理す
るようなものでそれはとてもできないことだといえる.
パッケージをそろえることで同じ環境が再現できることについて,同じ環境を再現するために
は様々なバージョンのパッケージをホスティングされる方法も柔軟に指定できることが必要であ
る.パッケージは大体の場合自分が開発したもの意外を使うわけだが,そのものをどうやって入
手すればいいかということを含めて確保しておかなければ,たとえ入っておかなければならない
パッケージとリストがあったとしても入手できずインストールできなくなってしまう.
パッケージのインストール/アンインストールについて,通常のパッケージ管理というと,イ
ンストールができることを指すことが多いと思われる.もちろんパッケージとバージョンを指定
したら,その OS 上で使うことができる様にインストールしてくれるのは大事な機能である.イ
ンストール時にはコンパイル済みのバイナリを配置するだけのものもあればその場でコンパイル
するものもある.もちろん,先の依存関係に基づいて必要なパッケージも同時にインストールし
てくれる必要もある.難しいのはそれを再起的に解決しなければならないところである.アンイ
ンストールは色々と気をつけなければならない点がある.なので標準では実装していないパッ
ケージ管理もある.気をつけなければならない点として,例えばプロセスが起動するようなパッ
ケージだとプロセスを止めないといけないなど,先の依存関係で自分が誰かに依存されてる場合
は,それらのパッケージもアンストールしないといけない点である.さらに,インストール前に
あるファイルを変更するようなパッケージの場合,完全にアンインストールするためにはその一
行をきれいに消さなければいけないが,一行消すのはかなりの手間が掛かってしまう.
パッケージのアップグレード/ダウングレードについて,yum update と打てば一回で最新のパッ
ケージ群にしてくれるのは一般の人とってはとても頼もしいものである.これができるためには,
バージョン,依存関係,インストールとすべてできる必要がある.ダウングレードはアンインス
トール以上に難易度が高い.なぜならほとんどの開発者がアップグレード方法に気は使うが,ダ
ウングレード方法には普通気を使わないためである.
パッケージマネージャ間の依存関係の管理について,バージョンを持ったパッケージ間に依存
関係を記述できるようにすることである.あるバージョンのパッケージ A を使うためには,バー
ジョン何とか以上のパッケージ B が必要になるような感じである.使う側が完全に依存を把握で
きていて順番を定義可能であったら,パッケージ関係において依存関係の記述はいらないと考え
られる.だが,パッケージ管理では色んな人が作ったパッケージを組み合わせることが多いわけ
であり,そうなると他人の作ったパッケージの中に自分が依存するパッケージ記述するほうが効
率が良いと考えられる.
2.3 IoT
2.3.1 Iot とは
IoT とは Internet of Things の略で日本語ではモノのインターネットという意味で解釈されている.モノの
インターネットとは,世の中に存在するあらゆる(さまざまな)モノ(商品・物体・設備)が
RFID(2.4.2)やセンサーを備えると共に、それらのモノがインターネットに接続されることに
より,モノの個体情報を識別したり,そのモノが置かれた状況を把握したり,そのモノ自体を制
御することができる仕組みや概念のことを指し示している[12].
2.3.2 RFID とは
RFID(Radio Frequency Identification)とは,数ミリから数センチ程度の無線 IC チップによりモ
ノや人物を識別・管理するしくみのことである.利用されている例としては,CD や図書などに
IC タグを付け店舗や施設の出入り口にリーダーを設置し,IC タグのついた商品を不正に持ち出
そうとすると警告を出すようにすることで,不正持ち出しなどを防止するなどが挙げられる[13].
3.システム設計
システム構成図として使用されているハードウェアとソフトウェアを明記した.
図 8 システム構成図
4.環境構築
4.1CGI の導入
4.1.1Apache の設定
・Apache のインストール
図1のように打つことにより Apache をインストールできる。
図 9 Apache を導入するための命令
・Apache の設定
/etc/apache2/mods-available/mime.conf の AddHandler cgi-script .cgi(図 2)のコメントアウトをはずす
ことにより CGI を使えるようにする。
図 10 #AddHandler cgi-script .cgi の#をはずす前
docroot で cgi を利用できるようにする
/etc/apache2/sites-available/default を編集して /var/www/(図 3 の 10 行目) の設定に「 +ExecCGI」を
追記する(図 3)。
図 11 10 行目に「+ExecCGI」を追記した後の設定
これで設定完了したので図 4 の命令を実行して Apache を再起動する。
図 12 Apache を再起動する命令
4.1.2CGI
図 13 のように命令を実行することにより leafpad を開いた後 test.cgi の名前でファイルを作成する
図 13 ディレクトリを指定して leafpad を開く命令
図 14 の命令を実行して test.cgi を実行可能にする
この作業をしないとブラウザで確認した際 InternetServerError がでる。
図 14 chmod を使って test.cgi を実行可能する命令
図 15 のように test.cgi にプログラムをかくことによりブラウザ上に図 8 のように HelloWorld!と表示
される。
図 15 ブラウザに HelloWorld!を表示させるためのプログラム
図 15 CGI を使ってブラウザ上に HelloWorld!を表示したもの
・CGI を使ってディレクトリ内の画像一覧を表示する
監視カメラとしてやく立てるためには motion を使って撮影できた画像を一覧としてブラウザで
確認できればいいと考えディレクトリ内の画像一覧を取得できるプログラムを作成した。
/var/www/motionImage の中にある画像をブラウザ上に表示する。図 16
図 16 ブラウザに表示するための画像一覧
次に図 17 にあるプログラミングを打つことによりブラウザに画像一覧図 18 が表示される。
プログラミング言語はシェルスクリプトを使用する。図 18 の画像は同じに見えるが違う画像で
ある。
図 17 ブラウザにディレクトリ内にある画像を表示するためのプログラム
図 18 ブラウザ上にディレクトリ内の画像を表示
5.機能
5.1 動作を確認して自動撮影
RaspberryPi には motion という名前のパッケージがあり,それをインストールすることにより
USB カメラや純正カメラ(カメラモジュール)を入力装置として使うことができるようになる.
motion とは,カメラからの映像に動き(変化)があったときにのみその映像または画像を記録する
ことができる.
5.2 ブラウザで現在の撮影状況を確認
motion の機能の一つとしてブラウザでリアルタイムに撮影している映像を 1 秒ごとに表示する
という機能がある.ブラウザで確認するための方法はブラウザを起動後 url に http://{RaspberryPi
の IP アドレス}:{設定したポート番号}を入力するとログイン名とパスワードを聞かれるので
そこの欄に RaspberryPi のユーザー名とパスワードを入力すればブラウザに表示される。
5.2.1 ブラウザごとの挙動
ブラウザごとに motion での撮影状況の確認画面が変わるため有名なブラウザの挙動をまとめる.
・Chrome
Chrome では URL を入力後応答なし.
図 19 Chrome で motion を確認しようとした結果
・IE
ログイン名・パスワードの確認画面はでるがその後応答なし.
図 20 IE で motion を確認しようとした結果
・Firefox
ログイン名・パスワードを聞かれその後ブラウザで確認できた.
図 21 Firefox で motion を確認した結果
確認したのは上記の 3 つのブラウザで他のブラウザでの確認は行っていない.
5.3 ブラウザで撮影した画像確認
撮影された画像は図 22 のように保存され,その保存されたものをブラウザで表示できるよう
にする図 23.
図 23 では図 22 で表示された画像がスライドショーのような形で表示される.
図 23 の機能として①で画像をスライドする速度を変える 100 単位で 100~1000 まで変更可能.
②を押すことによって画像のスライドをスタートすることができる.③で画像のスライドをとめ
ることができる.④が表示されている画像をスライドさせている部分である.注意点として,①
のスピードを変更する際に一度③のボタンを押して画像のスライドをとめてからでないとスピー
ドが変更されない.
図 22 カメラモジュールを使って撮影された画像保存場所
図 23 ブラウザを使って画像をスライドさせる
6.まとめ・考察
今回開発したものは出席確認としては最低限の機能はしっかりと備わったものが開発できた.
しかし,更に機能を追加して精度や機能の充実度を上げることは可能である.たとえば,保存し
た画像を1日ごとに別のフォルダに自動で移しメインのフォルダの中身は1日ごとにリセットさ
れるや日付ごとにブラウザで表示するなどが考えられる.まだまだ可能性はあったので自分の力
不足であまり充実でき無かったことは大変残念である.
この機能が完成すれば学生は少し窮屈な思いをするかもしれないが,教授にとってはかなりの
負担削減にはなると考えられる.
7.謝辞
研究を行うにあたって知識や実践経験の蓄積のない私に,分かりやすく時には時間を非常に多く割い
てご指導して下さった徐丙鉄先生には心から感謝しています.また,テーマは違いましたが私より
経験豊富な物理研究室のメンバーにもたくさん助けていただいて本当に感謝してます.
8.参考文献・引用
[1]サービスをセキュアにするための利用制限(3)~管理者権限の制限のための su と sudo の基
本~
http://www.atmarkit.co.jp/ait/articles/0311/05/news001.html
[2]Sudo in a Nutshell
http://www.sudo.ws/sudo/intro.html
[3]ユーザーの実行権限を柔軟に割り当てる sudo のリスクとメリット
http://www.itmedia.co.jp/enterprise/articles/0802/19/news013.html
[4]若者がパッケージ管理について思うこと
http://blog.riywo.com/2012/03/29/043426
[5]
http://arctica.sakura.ne.jp/cent/wp-content/uploads/2012/12/R7568308-01.jpg
[6]初回起動と初期設定
http://www.hiramine.com/physicalcomputing/raspberrypi/setup_firstbootandconfig.html
[7]Welcome to Raspbian
http://www.raspbian.org/
[8]RaspberryPi で遊ぼう
http://assimane.blog.so-net.ne.jp/2013-05-12
[9]weblio 辞書
http://www.weblio.jp/content/xrdp
[10]RaspberryPi ウィキペディア
http://ja.wikipedia.org/wiki/Raspberry_Pi#.E3.83.8F.E3.83.BC.E3.83.89.E3.82.A6.E3.82.A7.E3.82.A2
[11]e-Words
http://e-words.jp/w/SoC.html
[12]IoT とは
http://www.kobelcosys.co.jp/column/itwords/227/
[13]RFID とは
http://www.kobelcosys.co.jp/column/itwords/63/
http://www.e-ark.jp/2013/05/08/raspberry-pi-%E3%81%A7-cgibash%E3%82%92%E5%8B
%95%E3%81%8B%E3%81%99/
http://itpro.nikkeibp.co.jp/article/COLUMN/20060227/230751/
http://itpro.nikkeibp.co.jp/article/COLUMN/20060228/231159/?ST=oss
http://raspberrywebserver.com/cgiscripting/writing-cgi-scripts-in-python.html
https://github.com/carloscrespog/Berries-DrEWE/blob/master/motion-mmalcam.conf
https://ubun12.wordpress.com/tag/motion-conf/
http://safe-linux.homeip.net/web/motion/motion-03.html
9.付録(ソースコード・RaspberryPi 設定)
8.1 motionImage.cgi
#!/bin/bash
echo "Content-type:text/html"
echo ""
echo '<!DOCTYPE html>'
echo '<html>'
echo '<head>'
echo '<meta charset=UTF-8>'
echo '<title>motionImage</title>'
echo '</head>'
echo '<style>
img{ display: block;
position: absolute;
top:50px;
left:30px;
width: 300px;
}
</style>'
echo '<body>'
files="/var/www/motionImage/*"
④
for filepath in ${files}
do
file=`echo $filepath | cut -c 9-45`
echo "<img src="${file}">"
done
read wait
echo '<div>'
echo '<input id="timeSlider" type="range" min="100" max="1000" step="100"
onchange="showValue()" />'
echo '<span id="showRange">0</span>'
echo '<button onClick="startSlideShow()">slide start</button>'
echo '<button onClick="stopSlideShow()">stop</button>'
echo '</div>'
echo '<script>'
echo 'var intervalTime = 200;'
echo 'document.getElementById("timeSlider").value=intervalTime ;'
echo 'document.getElementById("showRange").innerHTML = intervalTime;'
echo 'function showValue () {
intervalTime = document.getElementById("timeSlider").value;
document.getElementById("showRange").innerHTML = intervalTime;
}'
echo 'var photos = document.getElementsByTagName("img");'
echo 'var timer = null;'
echo 'var N = photos.length; //alert("N="+N);'
echo 'var n = 0;'
echo '//zBase = photos[N].style.zIndex;'
echo 'zBase = 100 ; //alert("zBase="+zBase);'
echo 'topZindex = 0;'
echo 'function nextPhoto(){
++topZindex;
photos[n].style.zIndex = zBase + topZindex;
n++ ; n = n % N;
}'
echo 'function startSlideShow(){
if( timer == null ){
timer = setInterval("nextPhoto()", intervalTime );
}
}'
echo 'function stopSlideShow(){
clearInterval(timer); timer = null;
}'
echo '</script>'
echo '</body>'
echo '</html>'
プログラムメモ書き
echo:引数に与えられた文字列を表示する。
files=”/var/www/motionImage/*”:files に motionImage 下のファイル名を代入する
for filepath in ${files}:${}で{}ないの変数の中身を出力するという命令なので変数 file の中に入れ
た files=”/var/www/motionImage/*”を filepath の中に入れるという
命令である。
for
do(正)
done(誤)
``バックコート:バックコートの中にある処理の結果を返すという意味で
cut:文字列を抜き出す命令
cut -c:-c は cut のオプションで指定した文字数をとりだすというものである。
file=`echo $filepath | cut -c 9-45`:file に filepath に入った画像のファイル名の 9~45 文字めまでを入
れるという命令になる
cut を利用した理由として<img src=”画像ファイル指定”>といった風にしたいのだが画像ファイ
ル指定の部分が「/motionImage/ファイル名」だと表示されるが「/var/www/motionImage/ファイル
名」うまく表示できなかった。なので cut を使い files に入れた/var/www/motionImage/ファイル名
の前の/var/www の部分以外を抜き出すよう設定した。
・motionmmalcam.conf 設定(重要な部分)
############################################################
# Start in daemon (background) mode and release terminal (default: off)
daemon off
# File to store the process ID, also called pid file. (default: not defined)
process_id_file /var/run/motion/motion.pid
############################################################
# Capture device options
############################################################
# Videodevice to be used for capturing (default /dev/video0)
# for FreeBSD default is /dev/bktr0
#videodevice /dev/video0
# v4l2_palette allows to choose preferable palette to be use by motion
# to capture from those supported by your videodevice. (default: 17)
# E.g. if your videodevice supports both V4L2_PIX_FMT_SBGGR8 and
# V4L2_PIX_FMT_MJPEG then motion will by default use V4L2_PIX_FMT_MJPEG.
# Setting v4l2_palette to 2 forces motion to use V4L2_PIX_FMT_SBGGR8
# instead.
#
# Values :
# V4L2_PIX_FMT_SN9C10X : 0 'S910'
# V4L2_PIX_FMT_SBGGR16 : 1 'BYR2'
# V4L2_PIX_FMT_SBGGR8 : 2 'BA81'
# V4L2_PIX_FMT_SPCA561 : 3 'S561'
# V4L2_PIX_FMT_SGBRG8 : 4 'GBRG'
# V4L2_PIX_FMT_SGRBG8 : 5 'GRBG'
# V4L2_PIX_FMT_PAC207 : 6 'P207'
# V4L2_PIX_FMT_PJPG : 7 'PJPG'
# V4L2_PIX_FMT_MJPEG : 8 'MJPEG'
# V4L2_PIX_FMT_JPEG : 9 'JPEG'
# V4L2_PIX_FMT_RGB24 : 10 'RGB3'
# V4L2_PIX_FMT_SPCA501 : 11 'S501'
# V4L2_PIX_FMT_SPCA505 : 12 'S505'
# V4L2_PIX_FMT_SPCA508 : 13 'S508'
# V4L2_PIX_FMT_UYVY : 14 'UYVY'
# V4L2_PIX_FMT_YUYV : 15 'YUYV'
# V4L2_PIX_FMT_YUV422P : 16 '422P'
# V4L2_PIX_FMT_YUV420 : 17 'YU12'
#
v4l2_palette 17
# Tuner device to be used for capturing using tuner as source (default /dev/tuner0)
# This is ONLY used for FreeBSD. Leave it commented out for Linux
; tunerdevice /dev/tuner0
# The video input to be used (default: -1)
# Should normally be set to 0 or 1 for video/TV cards, and -1 for USB cameras
input -1
# The video norm to use (only for video capture and TV tuner cards)
# Values: 0 (PAL), 1 (NTSC), 2 (SECAM), 3 (PAL NC no colour). Default: 0 (PAL)
norm 0
# The frequency to set the tuner to (kHz) (only for TV tuner cards) (default: 0)
frequency 0
# Rotate image this number of degrees. The rotation affects all saved images as
# well as movies. Valid values: 0 (default = no rotation), 90, 180 and 270.
rotate 0
# Image width (pixels). Valid range: Camera dependent, default: 352
width 352
# Image height (pixels). Valid range: Camera dependent, default: 288
height 288
# Maximum number of frames to be captured per second.
# Valid range: 2-100. Default: 100 (almost no limit).
framerate 2
# Minimum time in seconds between capturing picture frames from the camera.
# Default: 0 = disabled - the capture rate is given by the camera framerate.
# This option is used when you want to capture images at a rate lower than 2 per second.
minimum_frame_time 1
# URL to use if you are using a network camera, size will be autodetected (incl http:// ftp:// mjpg:// or
file:///)
# Must be a URL that returns single jpeg pictures or a raw mjpeg stream. Default: Not defined
;netcam_url http://127.0.0.1/cgi-bin/raspicam.sh
# Username and password for network camera (only if required). Default: not defined
# Syntax is user:password
; netcam_userpass value
# The setting for keep-alive of network socket, should improve performance on compatible net cameras.
# off: The historical implementation using HTTP/1.0, closing the socket after each http request.
# force: Use HTTP/1.0 requests with keep alive header to reuse the same connection.
# on: Use HTTP/1.1 requests that support keep alive as default.
# Default: off
netcam_keepalive off
# URL to use for a netcam proxy server, if required, e.g. "http://myproxy".
# If a port number other than 80 is needed, use "http://myproxy:1234".
# Default: not defined
; netcam_proxy value
# Set less strict jpeg checks for network cameras with a poor/buggy firmware.
# Default: off
netcam_tolerant_check off
# Let motion regulate the brightness of a video device (default: off).
# The auto_brightness feature uses the brightness option as its target value.
# If brightness is zero auto_brightness will adjust to average brightness value 128.
# Only recommended for cameras without auto brightness
auto_brightness off
# Set the initial brightness of a video device.
# If auto_brightness is enabled, this value defines the average brightness level
# which Motion will try and adjust to.
# Valid range 0-255, default 0 = disabled
brightness 0
# Set the contrast of a video device.
# Valid range 0-255, default 0 = disabled
contrast 0
# Set the saturation of a video device.
# Valid range 0-255, default 0 = disabled
saturation 0
# Set the hue of a video device (NTSC feature).
# Valid range 0-255, default 0 = disabled
hue 0
############################################################
# File "camera" support - read raw YUV data from a file
############################################################
#filecam_path /home/pi/test-cap/motion-mmal.capture
############################################################
# Round Robin (multiple inputs on same video device name)
############################################################
# Number of frames to capture in each roundrobin step (default: 1)
roundrobin_frames 1
# Number of frames to skip before each roundrobin step (default: 1)
roundrobin_skip 1
# Try to filter out noise generated by roundrobin (default: off)
switchfilter off
############################################################
# Motion Detection Settings:
############################################################
# Threshold for number of changed pixels in an image that
# triggers motion detection (default: 1500)
threshold 5000
# Automatically tune the threshold down if possible (default: off)
threshold_tune off
# Noise threshold for the motion detection (default: 32)
noise_level 32
# Automatically tune the noise threshold (default: on)
noise_tune on
# Despeckle motion image using (e)rode or (d)ilate or (l)abel (Default: not defined)
# Recommended value is EedDl. Any combination (and number of) of E, e, d, and D is valid.
# (l)abeling must only be used once and the 'l' must be the last letter.
# Comment out to disable
despeckle_filter EedDl
# Detect motion in predefined areas (1 - 9). Areas are numbered like that: 1 2 3
# A script (on_area_detected) is started immediately when motion is
456
# detected in one of the given areas, but only once during an event.
789
# One or more areas can be specified with this option. Take care: This option
# does NOT restrict detection to these areas! (Default: not defined)
; area_detect value
# PGM file to use as a sensitivity mask.
# Full path name to. (Default: not defined)
; mask_file value
# Dynamically create a mask file during operation (default: 0)
# Adjust speed of mask changes from 0 (off) to 10 (fast)
smart_mask_speed 0
# Ignore sudden massive light intensity changes given as a percentage of the picture
# area that changed intensity. Valid range: 0 - 100 , default: 0 = disabled
lightswitch 0
# Picture frames must contain motion at least the specified number of frames
# in a row before they are detected as true motion. At the default of 1, all
# motion is detected. Valid range: 1 to thousands, recommended 1-5
minimum_motion_frames 5
# Specifies the number of pre-captured (buffered) pictures from before motion
# was detected that will be output at motion detection.
# Recommended range: 0 to 5 (default: 0)
# Do not use large values! Large values will cause Motion to skip video frames and
# cause unsmooth movies. To smooth movies use larger values of post_capture instead.
pre_capture 0
# Number of frames to capture after motion is no longer detected (default: 0)
post_capture 0
# Event Gap is the seconds of no motion detection that triggers the end of an event.
# An event is defined as a series of motion images taken within a short timeframe.
# Recommended value is 60 seconds (Default). The value -1 is allowed and disables
# events causing all Motion to be written to one single movie file and no pre_capture.
# If set to 0, motion is running in gapless mode. Movies don't have gaps anymore. An
# event ends right after no more motion is detected and post_capture is over.
event_gap 20
# Maximum length in seconds of a movie
# When value is exceeded a new movie file is created. (Default: 0 = infinite)
max_movie_time 0
# Always save images even if there was no motion (default: off)
emulate_motion off
############################################################
# Image File Output
############################################################
# Output 'normal' pictures when motion is detected (default: on)
# Valid values: on, off, first, best, center
# When set to 'first', only the first picture of an event is saved.
# Picture with most motion of an event is saved when set to 'best'.
# Picture with motion nearest center of picture is saved when set to 'center'.
# Can be used as preview shot for the corresponding movie.
output_pictures on
# Output pictures with only the pixels moving object (ghost images) (default: off)
output_debug_pictures off
# The quality (in percent) to be used by the jpeg compression (default: 75)
quality 75
# Type of output images
# Valid values: jpeg, ppm (default: jpeg)
picture_type jpeg
############################################################
# FFMPEG related options
# Film (movies) file output, and deinterlacing of the video input
# The options movie_filename and timelapse_filename are also used
# by the ffmpeg feature
############################################################
# Use ffmpeg to encode movies in realtime (default: off)
ffmpeg_output_movies off
# Use ffmpeg to make movies with only the pixels moving
# object (ghost images) (default: off)
ffmpeg_output_debug_movies off
# Use ffmpeg to encode a timelapse movie
# Default value 0 = off - else save frame every Nth second
ffmpeg_timelapse 0
# The file rollover mode of the timelapse video
# Valid values: hourly, daily (default), weekly-sunday, weekly-monday, monthly, manual
ffmpeg_timelapse_mode daily
# Bitrate to be used by the ffmpeg encoder (default: 400000)
# This option is ignored if ffmpeg_variable_bitrate is not 0 (disabled)
ffmpeg_bps 500000
# Enables and defines variable bitrate for the ffmpeg encoder.
# ffmpeg_bps is ignored if variable bitrate is enabled.
# Valid values: 0 (default) = fixed bitrate defined by ffmpeg_bps,
# or the range 2 - 31 where 2 means best quality and 31 is worst.
ffmpeg_variable_bitrate 0
# Codec to used by ffmpeg for the video compression.
# Timelapse mpegs are always made in mpeg1 format independent from this option.
# Supported formats are: mpeg1 (ffmpeg-0.4.8 only), mpeg4 (default), and msmpeg4.
# mpeg1 - gives you files with extension .mpg
# mpeg4 or msmpeg4 - gives you files with extension .avi
# msmpeg4 is recommended for use with Windows Media Player because
# it requires no installation of codec on the Windows client.
# swf - gives you a flash film with extension .swf
# flv - gives you a flash video with extension .flv
# ffv1 - FF video codec 1 for Lossless Encoding ( experimental )
# mov - QuickTime ( testing )
# ogg - Ogg/Theora ( testing )
ffmpeg_video_codec mpeg4
# Use ffmpeg to deinterlace video. Necessary if you use an analog camera
# and see horizontal combing on moving objects in video or pictures.
# (default: off)
ffmpeg_deinterlace off
############################################################
# Snapshots (Traditional Periodic Webcam File Output)
############################################################
# Make automated snapshot every N seconds (default: 0 = disabled)
snapshot_interval 0
############################################################
# Text Display
# %Y = year, %m = month, %d = date,
# %H = hour, %M = minute, %S = second, %T = HH:MM:SS,
# %v = event, %q = frame number, %t = thread (camera) number,
# %D = changed pixels, %N = noise level, \n = new line,
# %i and %J = width and height of motion area,
# %K and %L = X and Y coordinates of motion center
# %C = value defined by text_event - do not use with text_event!
# You can put quotation marks around the text to allow
# leading spaces
############################################################
# Locate and draw a box around the moving object.
# Valid values: on, off, preview (default: off)
# Set to 'preview' will only draw a box in preview_shot pictures.
locate_motion_mode on
# Set the look and style of the locate box if enabled.
# Valid values: box, redbox, cross, redcross (default: box)
# Set to 'box' will draw the traditional box.
# Set to 'redbox' will draw a red box.
# Set to 'cross' will draw a little cross to mark center.
# Set to 'redcross' will draw a little red cross to mark center.
locate_motion_style box
# Draws the timestamp using same options as C function strftime(3)
# Default: %Y-%m-%d\n%T = date in ISO format and time in 24 hour clock
# Text is placed in lower right corner
text_right %Y-%m-%d\n%T-%q
# Draw a user defined text on the images using same options as C function strftime(3)
# Default: Not defined = no text
# Text is placed in lower left corner
; text_left CAMERA %t
# Draw the number of changed pixed on the images (default: off)
# Will normally be set to off except when you setup and adjust the motion settings
# Text is placed in upper right corner
text_changes off
# This option defines the value of the special event conversion specifier %C
# You can use any conversion specifier in this option except %C. Date and time
# values are from the timestamp of the first image in the current event.
# Default: %Y%m%d%H%M%S
# The idea is that %C can be used filenames and text_left/right for creating
# a unique identifier for each event.
text_event %Y%m%d%H%M%S
# Draw characters at twice normal size on images. (default: off)
text_double on
# Text to include in a JPEG EXIF comment
# May be any text, including conversion specifiers.
# The EXIF timestamp is included independent of this text.
;exif_text %i%J/%K%L
############################################################
# Target Directories and filenames For Images And Films
# For the options snapshot_, picture_, movie_ and timelapse_filename
# you can use conversion specifiers
# %Y = year, %m = month, %d = date,
# %H = hour, %M = minute, %S = second,
# %v = event, %q = frame number, %t = thread (camera) number,
# %D = changed pixels, %N = noise level,
# %i and %J = width and height of motion area,
# %K and %L = X and Y coordinates of motion center
# %C = value defined by text_event
# Quotation marks round string are allowed.
############################################################
# Target base directory for pictures and films
# Recommended to use absolute path. (Default: current working directory)
target_dir /var/www/motionImage
# File path for snapshots (jpeg or ppm) relative to target_dir
# Default: %v-%Y%m%d%H%M%S-snapshot
# Default value is equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-snapshot
# File extension .jpg or .ppm is automatically added so do not include this.
# Note: A symbolic link called lastsnap.jpg created in the target_dir will always
# point to the latest snapshot, unless snapshot_filename is exactly 'lastsnap'
snapshot_filename %v-%Y%m%d%H%M%S-snapshot
# File path for motion triggered images (jpeg or ppm) relative to target_dir
# Default: %v-%Y%m%d%H%M%S-%q
# Default value is equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-%q
# File extension .jpg or .ppm is automatically added so do not include this
# Set to 'preview' together with best-preview feature enables special naming
# convention for preview shots. See motion guide for details
picture_filename %v-%Y%m%d%H%M%S-%q
# File path for motion triggered ffmpeg films (movies) relative to target_dir
# Default: %v-%Y%m%d%H%M%S
# Default value is equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d/%H%M%S
# File extension .mpg or .avi is automatically added so do not include this
# This option was previously called ffmpeg_filename
movie_filename %v-%Y%m%d%H%M%S
# File path for timelapse movies relative to target_dir
# Default: %Y%m%d-timelapse
# Default value is near equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d-timelapse
# File extension .mpg is automatically added so do not include this
timelapse_filename %Y%m%d-timelapse
############################################################
# Global Network Options
############################################################
# Enable or disable IPV6 for http control and stream (default: off )
ipv6_enabled off
############################################################
# Live Stream Server
############################################################
# The mini-http server listens to this port for requests (default: 0 = disabled)
stream_port 8081
# Quality of the jpeg (in percent) images produced (default: 50)
stream_quality 50
# Output frames at 1 fps when no motion is detected and increase to the
# rate given by stream_maxrate when motion is detected (default: off)
stream_motion off
# Maximum framerate for stream streams (default: 1)
stream_maxrate 1
# Restrict stream connections to localhost only (default: on)
stream_localhost off
# Limits the number of images per connection (default: 0 = unlimited)
# Number can be defined by multiplying actual stream rate by desired number of seconds
# Actual stream rate is the smallest of the numbers framerate and stream_maxrate
stream_limit 0
# Set the authentication method (default: 0)
# 0 = disabled
# 1 = Basic authentication
# 2 = MD5 digest (the safer authentication)
stream_auth_method 1
# Authentication for the stream. Syntax username:password
# Default: not defined (Disabled)
; stream_authentication username:password
############################################################
・Apache 設定
<IfModule mod_mime.c>
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
TypesConfig /etc/mime.types
#
# AddType allows you to add to or override the MIME configuration
# file mime.types for specific file types.
#
#AddType application/x-gzip .tgz
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
# Despite the name similarity, the following Add* directives have
# nothing to do with the FancyIndexing customization directives above.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#AddEncoding x-bzip2 .bz2
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-bzip2 .bz2
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
#
# DefaultLanguage and AddLanguage allows you to specify the language of
# a document. You can then use content negotiation to give a browser a
# file in a language the user can understand.
#
# Specify a default language. This means that all data
# going out without a specific language tag (see below) will
# be marked with this one. You probably do NOT want to set
# this unless you are sure it is correct for all cases.
#
# * It is generally better to not mark a page as
# * being a certain language than marking it with the wrong
# * language!
#
# DefaultLanguage nl
#
# Note 1: The suffix does not have to be the same as the language
# keyword --- those with documents in Polish (whose net-standard
# language code is pl) may wish to use "AddLanguage pl .po" to
# avoid the ambiguity with the common suffix for perl scripts.
#
# Note 2: The example entries below illustrate that in some cases
# the two character 'Language' abbreviation is not identical to
# the two character 'Country' code for its country,
# E.g. 'Danmark/dk' versus 'Danish/da'.
#
# Note 3: In the case of 'ltz' we violate the RFC by using a three char
# specifier. There is 'work in progress' to fix this and get
# the reference data for rfc1766 cleaned up.
#
# Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
# English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
# Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
# Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
# Norwegian (no) - Polish (pl) - Portugese (pt)
# Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
# Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
#
AddLanguage am .amh
AddLanguage ar .ara
AddLanguage be .be
AddLanguage bg .bg
AddLanguage bn .bn
AddLanguage br .br
AddLanguage bs .bs
AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage cy .cy
AddLanguage da .dk
AddLanguage de .de
AddLanguage dz .dz
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
# es is ecmascript in /etc/mime.types
RemoveType es
AddLanguage es .es
AddLanguage et .et
AddLanguage eu .eu
AddLanguage fa .fa
AddLanguage fi .fi
AddLanguage fr .fr
AddLanguage ga .ga
AddLanguage gl .glg
AddLanguage gu .gu
AddLanguage he .he
AddLanguage hi .hi
AddLanguage hr .hr
AddLanguage hu .hu
AddLanguage hy .hy
AddLanguage id .id
AddLanguage is .is
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ka .ka
AddLanguage kk .kk
AddLanguage km .km
AddLanguage kn .kn
AddLanguage ko .ko
AddLanguage ku .ku
AddLanguage lo .lo
AddLanguage lt .lt
AddLanguage ltz .ltz
AddLanguage lv .lv
AddLanguage mg .mg
AddLanguage mk .mk
AddLanguage ml .ml
AddLanguage mr .mr
AddLanguage ms .msa
AddLanguage nb .nob
AddLanguage ne .ne
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pa .pa
AddLanguage pl .po
AddLanguage pt-BR .pt-br
AddLanguage pt .pt
AddLanguage ro .ro
AddLanguage ru .ru
AddLanguage sa .sa
AddLanguage se .se
AddLanguage si .si
AddLanguage sk .sk
AddLanguage sl .sl
AddLanguage sq .sq
AddLanguage sr .sr
AddLanguage sv .sv
AddLanguage ta .ta
AddLanguage te .te
AddLanguage th .th
AddLanguage tl .tl
RemoveType tr
# tr is troff in /etc/mime.types
AddLanguage tr .tr
AddLanguage uk .uk
AddLanguage ur .ur
AddLanguage vi .vi
AddLanguage wo .wo
AddLanguage xh .xh
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw
#
# Commonly used filename extensions to character sets. You probably
# want to avoid clashes with the language extensions, unless you
# are good at carefully testing your setup after each change.
# See http://www.iana.org/assignments/character-sets for the
# official list of charset names and their respective RFCs.
#
AddCharset us-ascii .ascii .us-ascii
AddCharset ISO-8859-1 .iso8859-1 .latin1
AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
AddCharset ISO-8859-3 .iso8859-3 .latin3
AddCharset ISO-8859-4 .iso8859-4 .latin4
AddCharset ISO-8859-5 .iso8859-5 .cyr .iso-ru
AddCharset ISO-8859-6 .iso8859-6 .arb .arabic
AddCharset ISO-8859-7 .iso8859-7 .grk .greek
AddCharset ISO-8859-8 .iso8859-8 .heb .hebrew
AddCharset ISO-8859-9 .iso8859-9 .latin5 .trk
AddCharset ISO-8859-10 .iso8859-10 .latin6
AddCharset ISO-8859-13 .iso8859-13
AddCharset ISO-8859-14 .iso8859-14 .latin8
AddCharset ISO-8859-15 .iso8859-15 .latin9
AddCharset ISO-8859-16 .iso8859-16 .latin10
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5
.Big5
.big5 .b5
AddCharset cn-Big5 .cn-big5
# For russian, more than one charset is used (depends on client, mostly):
AddCharset WINDOWS-1251 .cp-1251 .win-1251
AddCharset CP866
.cp866
AddCharset KOI8
.koi8
AddCharset KOI8-E .koi8-e
AddCharset KOI8-r .koi8-r .koi8-ru
AddCharset KOI8-U .koi8-u
AddCharset KOI8-ru .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-7
.utf7
AddCharset UTF-8
.utf8
AddCharset UTF-16
.utf16
AddCharset UTF-16BE .utf16be
AddCharset UTF-16LE .utf16le
AddCharset UTF-32
.utf32
AddCharset UTF-32BE .utf32be
AddCharset UTF-32LE .utf32le
AddCharset euc-cn .euc-cn
AddCharset euc-gb .euc-gb
AddCharset euc-jp
.euc-jp
AddCharset euc-kr .euc-kr
#Not sure how euc-tw got in - IANA doesn't list it???
AddCharset EUC-TW .euc-tw
AddCharset gb2312
.gb2312 .gb
AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2
AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4
AddCharset shift_jis .shift_jis .sjis
AddCharset BRF
.brf
#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
AddHandler cgi-script .cgi
#
# For files that include their own HTTP headers:
#
#AddHandler send-as-is asis
#
# For server-parsed imagemap files:
#
#AddHandler imap-file map
#
# For type maps (negotiated resources):
# (This is enabled by default to allow the Apache "It Worked" page
# to be distributed in multiple languages.)
#
AddHandler type-map var
#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule>
Fly UP