The CEHTTP is the WEB server program which runs on WindowsCE (version 2.1x or later). HTML can be widely exhibited through a network. General CGI, such as Perl, PHP, does not operate yet. Instead, the extension which is written by C++ is prepared. Basic authentication is supported. It is possible to require the user name and the password from a client.
The CEHTTP, it is small and speedy server created for WindowsCE devices. All was written by C++. It runs with multithread. And it always tested by the stress tools. It is thinking as implementation was less important than efficiency on the CEHTTP. Apache and IIS are designed to perform efficiently with server spec PC. So, it is heavy and large spec for WindowsCE. Moreover, the CEHTTP cannot be easily infected with a virus. Many server viruses which have appeared on the internet aimed Pentium processor. Probably it is not infected with a virus like NIMDA, and who virus maker will not make virus for the CEHTTP.
It is Web server. Please use to distribute Web contents. I think that the old WindowsCE device can be revived as ecological server in the regular connection environments, such as DSL. It is mobile Web server that can carry freely.
Please download the newest version of the CEHTTP on your computer. And extract the CEHTTP package.
In accordance with CPU of your WindowsCE, copy file to your device.
For ARM cehttp2.ARM.CAB
For SH3 cehttp2.SH3.CAB
For SH4 cehttp2.SH4.CAB
To know that CPU type of your device, Please probe 'the property of fhs system' by the control panel. After copying the CAB file, Please execute it on the device. An installer starts automatically, and then CEHTTP is installed
Default install place is as follows
Since it is a WEB server software, your WindowsCE device have to connect to the network.
If it has been executed for the first time, the above dialog box will
appear, since there is no document root folder on the device.
Here, Please tap "Yes" button. CEHTTP create document root folder and "index.html" file.
If CEHTTP is gracefully executed, it becomes the above screens. (In the case of HPC/Pro/2000）
"IP Address" is IP address which CEHTTP recognized.
If the device is not connect to the network, or cannot obtain the address from DHCP server, CEHTTP cannot be accessed from other PC's. Please check your network settings and restart CEHTTP again.
"Status" is present situation.
If displayed as "Listen...", CEHTTP started normally.
When displayed as "Listen failed.", it is in the state where starting server has failed.
Tapping task tray icon, CEHTTP window will be un-displayed. Tapping again, window will be displayed.
For the test, access with your PC's browser to CEHTTP server. If 'IP address' is "192.168.2.31", HTTP address is as follows.
If you can see the message "Can you see me?" on your browser, installation is success and completion.
If log file is required, additional installation of the extension DLL which takes a log file can be carried out by the same method.
A setting dialog appears by clicking "Setting" button.
"document root" is the place of root folder in case of Web access. By the
default, it is "\wwwroot".
If there is a file "\wwwroot\index.html", it can be accessed by the URL 'http://<IP address>/index.html'.
If there is a file "\wwwroot\cehttp\index.html", it can be accessed by URL 'http://<IP address>/cehttp/index.html'
The special folder for operating server extension is specified. By the default, it is "\wwwroot\scripts". It must be placed under the "document root". It is special folder to which CEHTTP processes a request, only when 'CHX' and 'DLL' extension is requested. An ordinary HTML file or the other document cannot be read from here.
The port number is specified for which Web server listen. Usually Web server listens at 80. For example, when Web server listens at 8081, a browser can access as follows.
The server threads are specified for number of server threads. Default value is 8. If the number of servers increases, the response of a request will become good, but more memories are consumed.
When accessing to the web server, a user name and password can be required. CEHTTP supports "Basic authentication".
If accessing to the page which require basic authentication from browser, the above dialog box will be appeared on your browser. A user can access that page after authentication with a user name and a password.
Probably, the page for management of BBS need to access restriction. It is
useful to such situation.
Moreover, log file remains authentication user name. if need to manage strictly that who was accessed, it is useful.
The password file is named 'access.cha' by the default. The password file forms is follows.
For example, when a user name is 'taro', password is 'yamada', describe as follows.
Any number of persons can add to list of names. (if memory allows)
This file must be saved in single byte text form. probably, Text editor on WindowsCE save text file in UNICODE by the default. so, it will be good to create password file on desktop PC, and copy to WindowsCE device.
The place of the password file is the place of folder to hang authentication.
When the password file is placed to the folder, the effect of access restriction attains to even a sub folder. When there are two or more password files, the nearest password file of parent folder is used.
There are password file like follows.
At this time,
"http://<server>/" is restricted by
"http://<server>/UnitedKingdom/" is restricted by access.cha(B) file.
"http://<Server>/UnitedKingdom/London/" is restricted access.cha(B) file.
When only access.cha(A) file is placed, all accesses is restricted by this file.
Some registry settings can arrange the behavior of the CEHTTP. Please use free software to operate WindowsCE registry database. There is not so much reason to arrange those settings.
The registry settings be used by the CEHTTP are stored under
|key name||type||default value||description|
|Port||DWORD||80||The listen port number.|
now not available.
To allow processing request with permanent connections.
|StartServers||DWORD||8||Number of server threads.
CEHTTP runs on multithread. The number of these threads can be
|DocRoot||STRING||\wwwroot||The place of the folder of document root.|
|CgiRoot||STRING||\wwwroot\scripts||The place of the folder of extension files.
Please be sure to be placed under the document root.
|DefaultDoc||STRING||index.html||The name of default document.
If the request from client has not described about document name, it will be used as document name.
|BasicAuthFile||STRING||access.cha||The name of basic authentication file.
CEHTTP is treated the file named "access.cha". It cannot be accessed. If it is necessary to use name of "access.cha", change here.
|LogFile||STRING||\access_log.txt||Log file name
When the access log is acquired, that is the name of log file path and name. It can
|LogSize||DWORD||102400||Log file size
Restriction of the log file size is hung. By the default, size is 102400 bytes(=10KB). The current log file is renamed to backup file, and new file is created. That is, amount of log file size is become to 20KB.
If this option was set to other than 0, CEHTTP queries domain name to
the DNS server.
MIME types are the extension of a file which specify the contents of that file. The extension ".html" means that it is HTML file.
For example, the file described as follows.
<html><body><b> hello </b></body></html>
The browser display as follows if the file name is "test.html".
but, if the file name is "test.txt", the browser display as follows.
The server is send to browser content-type according to MIME types.
In CEHTTP, some MIME types are set up beforehand.
A MIME type can be added and changed by "AddType.txt".
The following form describes in text form
<extension>:<a corresponding contents type>
For example, when you need to set up an extension ".hdml" and content type "text/x-hdml;charser=Shift-JIS", describe file as follows.
If no description at the file, the Web server cannot determine the file type, and transmit to a browser this file as unknown type (Content-type: application/octet-stream).
Any number of MIME types can be described like follows.
The place of AddType.txt is a folder which installed CEHTTP. CEHTTP read it at the time of starting.
CEHTTP can take access log by using log file DLL extension.
Apache standard form is made reference.
192.168.2.31 - user [11/Feb/2003:14:58:25 ] "GET / HTTP/1.1" 304 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
The above logs can be taken. It is as follows for details.
|192.168.2.31||Client host address.|
|-||ident - not used on CEHTTP.|
|user||The user name of basic authentication.|
|[11/Feb/2003:14:58:25 +900]||Access time.|
|"GET / HTTP/1.1"||Request details.|
|304||The result of a request.|
|-||The transmitted number of bytes.|
|"Mozilla/4.0"||User agent name.|
By the default, it is set to "\access_log.txt". This value can be changed by registry value.
If the log file becomes a certain size, log file is renamed and create newly log file. The name of backup file is created from current log file name. the end of file name is transposed to an underscore.
"access_log.txt" -> "access_log.tx_"
Taking log file required cost at the time of high load, it may become the bottle neck of performance.
CEHTTP is extensible with DLL. There are CHX type DLL type and MOD type in
an extended file. Please refer to the help of each extended file.
Moreover, refer to the "CEHTTP technical manual" for the creation method.
CHX/DLL files performed in a extension folder. When called from a browser, theCEHTTP load dynamically and performs.
Please arrange the file of an extension ".mod" in the place where the CEHTTP was installed.
The CEHTTP searches a mod file at the time of starting. For example, if there is the MOD extension file "abc.mod", "abc" is dynamically added to a MIME type list. When a file "foo.abc" requested, "abc.mod" extension is loaded by CEHTTP and performed.
An imperfect extension file makes CEHTTP unstable.
The CEHTTP could send the original error page according to the HTTP status code. For example, when user requested the unknown page, the web server can send the original 404 error html page linked to top page.
Make "ErrorDocument.txt" and install it in the place where the CEHTTP was installed.
And describe file as follows.
<error number><space><error page>
If you wish send /error/404.html file when the user requested unknown page, make error html page and arrange the "ErrorDocument.txt" like follows.