General Paranoyaxcで公開されているWindows CE用のApacheに関する情報。
ちょっと特殊な部分がありますが、PerlCEと組み合わせてローカルでCGIの試験もできるようです。 PerlCEはすでに、動作を確認しています。
前半部「ApacheCE」は、2002年11月28日現在の上記サイトの和訳です。 後半部「apache-ce.txt」は、2002年11月28日現在のapache-arm-ppc-wce300に同梱されているファイルです。 過去に上記サイトからリンクされていたREADMEに情報を追加したものになっているようです。
Rainer Keuchel氏にはメールで公開の許可をいただきました。
ApacheCEはApache1.3.20 web-serverをWinCEに移植したものです。 これは、シンプルなCGIアプリケーションをサポートします。 この移植はプロフェッショナルなWebサーバーではなく、電車の待ち時間にHTMLやCGIを書き、テストするためのプラットフォームであることを目的としています。
ApacheCE is a port of the Apache 1.3.20 web-server to WinCE. It supports simple cgi apps. The port is not intended to be used as a professional web-server, but as a test platform for writing html and cgi code while you're waiting for the train.
2002年10月19日(土)
Sat Oct 19 2002:
2002年5月4日
Sat May 04 2002:
ApacheCEはWinNTへの移植を元に、汚い変更をたくさんしています。 これは私のcelib.dllと一緒にコンパイルされています。
ApacheCEはたった1つのプロセスと10のスレッドしか使えません。 ローカルでの試験サーバにする分には問題ないでしょう。
ウィンドウはトレイアイコンをクリックすることで表示/非表示に切り替えられます。
何か問題が起きた時は、\apache-stderr.txtでメッセージを見つけられるでしょう。
HKLM\EnvironmentのAPACHEDIRに、サーバーのインストールディレクトリを設定することができます。 そうしなかった場合、Apacheバイナリのパスが採用されます。
ApacheCE is based on the WinNT port, with lot's of dirty modifications. It compiles with my celib.dll.
ApacheCE uses only one process and allocates only 10 threads. This should be no problem for a local test server.
The window can be hidden/shown by clicking on the tray icon.
If something goes wrong, messages might be found in \apache-stderr.txt.
You can set APACHEDIR in HKLM\Environment to point to the server installation dir. Otherwise the path of the apache binary is taken.
CGIは現在、一度に1つのリクエストだけを受け付けることができます。 環境変数は\cgi-env.txtに出力され、CGIからの出力は\cgi-ut.txtに存在します。 POSTによる入力は\cgi-in.txtにあります。
WinCEでは環境変数やファイルハンドル、パイプを子プロセスに渡すことができないので、スクリプトはこれらのファイルを処理/作成する必要があります、
\cgi-out.txtは子プロセス/スクリプトが削除されると、サーバーによって処理されます。
これらのファイル処理の例として、printenv.plを参照してください。
Interpreter Selectionのためにレジストリを使うには、下の例のようにhttpd.conf内で"ScriptInterpreterSource?"を設定する必要があります。 この例の行を使わないことも方法もなくはありません。 もちろん、HKEY_CLASSES_ROOTへの適切な設定が必要となります。
CGI currently only works with one request at a time. Environment variables are written to \cgi-env.txt and output of the cgi is expected in \cgi-out.txt. Input from post is in \cgi-in.txt.
It's the script's Professional resume services responsibility to process/create these files, as it is not possible in WinCE to pass environment, filehandles, pipes to child processes.
\cgi-out.txt is processed by the server when the child/script has terminated.
See printenv.pl for a sample of how to process these files.
今版ではCGIはパイプを用いて動作します。 これは、celib.dllを利用するプログラムのみがCGIとして利用できることを意味します。
今版では環境(変数)は直接子プロセスに引き継がれますが、いまだにenvファイルにも書き込まれます。
新しいサンプルとして、printenv2.plを参照してください。
CGI now works with pipes which means that only programs that use celib.dll can be used for CGI.
The environment is now passed directly to child processes, although the env file is still written.
See printenv2.pl for a new sample.
Interpreter Selectionのためにレジストリを使うには、下の例のようにhttpd.conf内で"ScriptInterpreterSource?"を設定する必要があります。 あるいは、shebang行を使うこともできます。 もちろん、HKEY_CLASSES_ROOTへの適切な設定が必要となります。
To use the registry for interpreter selection, you must set "ScriptInterpreterSource?" in httpd.conf, as in the example below. Otherwise the shebang line will be used. You need the right entries in HKEY_CLASSES_ROOT, of course.
<Directory "/speicherkarte/apache/cgi-bin"> ScriptInterpreterSource registry AllowOverride None Options None Order allow,deny Allow from all </Directory>
コンソールにリンクされた新しいプログラムは、現在の版は--noconsoleオプションをチェックします。 SHELL/OPEN/COMMANDのエントリにこのオプションを入れてやるべきでしょうが、しかし以降は.plファイルをダブルクリックしてコンソール付きで開始させることはできなくなります...。
New programs that are linked with the console now check the option --noconsole. You would have to put this option in the SHELL/OPEN/COMMAND entry, but you cannot start .pl files with console by doubleclicking anymore...
(ここにお書きください。)
[[#comment]]