[NANOWEB DOCUMENTATION]

NANOWEB, the aEGiS PHP web server

Tools

there are of course different ways and tools to start up our bring down nanoweb depending on the operating system your computer runs:
· nanoctl for Linux/MacOS/UNIX
· nanostart.bat for Windows
· invoking nanoweb.php directly  

Starting nanoweb server

You should use nanoctl for starting, stopping or restarting the nanoweb server; as it handles the pid files and gives the default configuration file to the server.

   nanoctl start

will bring up the server

starting of nanoweb at boottime

The nanoctl util was designed to be easily installed for use by the common linux bootup scripts (sysV init rcNdirs). All you need to do is to create a symlink from nanoctl into the init-directory:

   ln -s /usr/sbin/nanoctl /etc/rc2.d/S80nanoweb

this will bring up nanoweb automatically when your computer starts up into runlevel 2.

Please refer also to the README of this utility.

Starting nanoweb without nanoctl

Its highly recommended to use nanoctl for starting or terminating the server, you may however just run nanoweb.php as any other ordinary program, which is useful for debugging (set LogToConsole accordingly).

   php nanoweb.php /etc/nanoweb/nanoweb.conf &
Giving the name of the php binary on the prompt is not required in most cases. The first argument must be the path to the server config file.

Starting nanoweb this way is useful if you'd like to give it additonal configuration options overriding the ones found in the default config files.
Please use nanoweb.php --help to see how this can be done.

Stopping

You can use nanoctl again to stop nanoweb:
nanoctl stop

Or without nanoctl:
kill -TERM `cat /var/run/nanoweb.pid`

Restarting

There is also of course a nanoctl option to restart nanoweb:
nanoctl restart

Without nanoweb:
kill -HUP `cat /var/run/nanoweb.pid`


Please see also the nanoctl README.
 

Starting nanoweb under Windows

If you installed nanoweb to the default directories, there will be a C:\NANOWEB\NANOSTART.BAT which can be used to start the server. You may want to make a Windows visual connection from this batch file onto your Desktop.  

nanoweb.php

You can of course invoke the server script directly by entering it's name on the commandline (optionally preceeded by the name of the PHP interpreter):
localhost~# nanoweb.php
C:\> PHP.exe C:\nanoweb\nanoweb.php

This form of invocatition allows you to give additional command line options. Just enter to nanoweb.php --help to get following:
--help gives help on commandline options
--version shows nanoweb version
--config=/path2/nanoweb.conf defines where the nanoweb configuration file is located
--set-option="directive=value" overrides configuration directive from the main server configuration file
--add-option="directive=value" adds additional configuration directive from the main server configuration file, where a directive may be given multiple times
--start-daemon brings up nanoweb in standalone mode
--inetd runs nanoweb in inetd mode (one request from stdin)
--quiet no output to stdout during run (for inetd mode)
--verbose more noise on startup, try this one if you can't get nanoweb to startup correctly
--debug like verbose



NANOWEB, the aEGiS PHP web server