[hih-BAH-chee] DescriptionHIBACHI is a simple, small, and secure web server with virtual host and CGI support. It is a limited implementation of RFC 2616 and the CGI/1.1 Specification. HIBACHI was written as an entry for the International Obfuscated C Code Contest and works for any Unix variant including the Cygwin environment for Windows. HIBACHI supports dynamic web content through the use of the Common Gateway Interface (CGI) specification. Just about any scripting or programming language can be used, such as a POSIX shell, Perl, PHP, Python, and/or Ruby. Existing CGI scripts can be used with little or no modification. Hibachi executes all CGI scripts as though they were "nph" prefixed, which is to say that it is the script's responsibility to send the HTTP status line and necessary headers direct to the client. Virtual host support is implemented as subdirectories of the HIBACHI document tree, where the directory name is the domain name publish in a URL. For example to setup a virtual host by name or IP for https://www.ioccc.org/, assuming the HIBACHI document tree is rooted at /usr/local/share/hibachi, then: /usr/local/share/hibachi/ www.ioccc.org/ index.html ... 64.81.251.233 -> www.ioccc.org/ HIBACHI is ideal for special floppy-Linux distributions, like Leka, which can be used for rescue, firewall, demo, or dedicated servers. In theory, with some modifications, HIBACHI and a script interpreter, like PHP, could also be bundled with CDROMS that require a means of presenting dynamic web pages. Features
Installation
Usage
First read and configure the file ./hibachi-start.sh & lynx http://localhost:8008/ To stop the server: kill %1 To access this documentation and examples from the Internet, create symbolic links for the host name and/or IP pointing to the «localhost» directory. For example, replace the IP and host name addresses below with that of the machine running HIBACHI: ln -s localhost 64.81.251.233 ln -s localhost www.ioccc.org HIBACHI can server multiple websites from the same machine simply by creating content directories with the same name as the URL domain names within the document root tree. Domain and/or IP aliases are simply symbolic links to content directories. There is never any need to restart HIBACHI when websites are published or aliases added. Assuming the server is running and that port 8008 is not blocked by any firewall, you should be able to access the server from the Internet using an IP or host name URL similar to: https://185.199.111.153 https://www.ioccc.org:8008/ Port 8008 (http-alt) was chosen as the default port for demonstration purposes, since its an alternative HTTP port that does not require special privileges and is rarely in use. Of course, HIBACHI could be run as a standard web server on port 80, but this would require that it be installed by the system administrator, contrary to IOCCC rules. CGI ExamplesThe following tests and examples are available to demonstrate various aspects of the CGI support:
Portability
LicenseIn accordance with the International Obfuscated C Code Contest this is an original work and placed in the public domain. DisclaimerTHIS SOFTWARE IS PROVIDE "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO WAY SHALL THE AUTHOR OR LICENSEE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SupportFree support is limited, based on the author's availability, though enhancements requests and problem reports are welcome (see logo above). |