1.Introduction

  1. What is it

  2. 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.

  3. What differ form Apache/IIS

  4. 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.

  5. What to use

    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.

2.How to install

  1. Download

    Please download the newest version of the CEHTTP on your computer. And extract the CEHTTP package.

  2. Copy to WindowsCE device

    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
    For cehttp2.MIPS.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

    "\program files\cehttp\cehttp2.exe"

     

  3. Execute

    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.

    http://192.168.2.31/

    If you can see the message "Can you see me?" on your browser, installation is success and completion.

  4. Other files

    If log file is required, additional installation of the extension DLL which takes a log file can be carried out by the same method.

3.Setup

  1. Setting dialog

    A setting dialog appears by clicking "Setting" button.

     

  2. Document root

    "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'

  3. Extension root

    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.

  4. Port number

    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.

    http://<IP address>:8081/...

  5. Server threads

    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.

4.Basic authentication

  1. About basic authentication

    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.

  2. The form of password file.

    The password file is named 'access.cha' by the default. The password file forms is follows.

    <username>:<password>

    For example, when a user name is 'taro', password is 'yamada', describe as follows.

    taro:yamada

    Any number of persons can add to list of names. (if memory allows)

    taro:yamada<new-line>
    ichiro:suzuki<new-line>
    --

    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.

  3. The place for password file

    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.

    Exapmle;

    [\wwwroot]
    +access.cha -A

    [\UnitedKingdom ]
    ||
    |+access.cha -B
    |+[\London]

    There are password file like follows.
    \wwwroot\access.cha(A)
    \wwwroot\UnitedKingdom\access.cha(B)

    At this time,

    "http://<server>/" is restricted by access.cha(A) file.
    "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.

     

5.Registry setup

    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

     [HKEY_LOCAL_MACHINE\SOFTWARE\ISHISOFT\CEHTTP].

    key name type default value description
    Port DWORD 80 The listen port number.
    Timeout DWORD 3000 Timeout value

    now not available.

    KeepAlive DWORD 1 Keep Alive

    To allow  processing request with permanent connections.
    Before HTTP/1.1, when one request was processed, one socket is connected. However, now a days, a request of a HTML file occurred many transaction,  such as GIF, PNG files related HTML file. The socket connection is not so light process. therefore Keep Alive interface is called in HTTP/1.1.

    StartServers DWORD 8 Number of server threads.

    CEHTTP runs on multithread. The number of these threads can be specified.
    When increase the number of  threads, response become good at the high load, and the amount of the memory use becomes large.

    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.

    DNSLookup DWORD 0 DNS Lookup

    If this option was set to other than 0, CEHTTP queries domain name to the DNS server.
    and Extension files can obtain "REMOTE_HOST" environment value.
    Remote host value on access log is written with domain name.
    but, the response of request will become bad.

     

6.MIME types

  1. About a MIME type

    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".

    hello

    but, if the file name is "test.txt", the browser display as follows.

    <html><body><b> hello </b></body></html>

    The server is send to browser content-type according to MIME types.

  2. Default MIME type

    In CEHTTP, some MIME types are set up beforehand.

    .html text/html
    .htm text/html
    .gif image/gif
    .png image/png
    .jpg image/jpeg
    .jpeg image/jpeg
    .txt text/plain
    .css text/css
    .bmp image/bitmap
    .tif image/tiff
    .tiff image/tiff
    .mpg video/mpeg
    .mpeg video/mpeg
    .pdf application/pdf
    .ls application/x-javascript
    .js application/x-javascript
    .mp3 audio/mp3
    .m3u audio/x-mpegurl
    .wav audio/x-wav
    .mid audio/mid
    .midi audio/mid
    .swf application/x-shockwave-flash

  3. Addition of a MIME type

    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.

    .hdml text/x-hdml;charset=Shift_JIS

    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.

    .hdml text/x-hdml;charset=Shift_JIS<return>
    .wml text/vnd.wap.wml;charset=Shift_JIS<return>

  4. The place for MIME type file.

    The place of AddType.txt is a folder which installed CEHTTP. CEHTTP  read it at the time of starting.

7.Log File

  1. About a log file

    CEHTTP can take access log by using log file DLL extension.

  2. The form of a log file

    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.

     

  3. The place of log file

    By the default, it is set to "\access_log.txt". This value can be changed by registry value.

  4. Log rotation

    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_"

  5. Notes

    Taking log file required cost at the time of high load, it may become the bottle neck of performance.

8.Extension file

  1. About an extension file

    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.

  2. CHX/DLL extension

    CHX/DLL files performed in a extension folder. When called from a browser, theCEHTTP load dynamically and performs.

  3. MOD extension

    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.

  4. Notes

    An imperfect extension file makes CEHTTP unstable.

9.Error page file

  1. About an Error page file

    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.

  2. The form of a error page setting file

    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.

    404 /error/404.html


yu-ishi@ya2.so-net.ne.jp
Copyright (C) 2003 IshiSoft Allrights reserved.