Starting and Stopping AppWeb (Manually)

After installation, AppWeb is normally started automatically as a system service or system daemon. You can change this behavior and only start AppWeb manually if you wish.

This page gives information about starting and stopping AppWeb manually. Before you can run AppWeb manually, you must first stop it running as a system service. See Running as a service for how to stop AppWeb running as a system service.

AppWeb Programs

The appWeb program may be run in the foreground or in the background as a system service (daemon). On Windows, AppWeb normally runs as a windows application or a system service, however it may run also be run explicitly as a console application via the "-c" switch.

    AppWeb Command Line

    Both the appWeb and appWeb programs may be invoked from the command line. The command syntax is:

    appWeb [options]

    AppWeb Command Options

    Auto-scan for a free port. Port scanning starts with the port specified by the -a switch or from 80 if running as super-user (administrator), or 1080 if running unprivileged.
    -a IP:PORT Specify the IP and port address to listen on. You may omit the IP or the port portion. If the IP portion is omitted, then all interfaces will be listened to. If the port portion is omitted, then port 80 will be used.
    Run appWeb as a daemon in the background.
    Set DEBUG mode on. This will disable all timeouts and is useful for single-step debugging.
    -d docRootDir Specify the directory holding the web documents to serve.
    -f configFile
    Specifies an alternative configuration file instead of appWeb.conf.
    Kill a currently running appWeb.
    -l logSpec
    Specify a file to log messages. This will override the ErrorLog directive in the configuration file. The syntax is: -l logName[,moduleName][:logLevel][.maxSize]. When the maximum size is exceeded, the log file will be rotated to logName.old and a new log file will be started.
    Dump memory statistics when exiting. Only active if using the fast malloc allocator if the  MPR_FEATURE_MALLOC and MPR_FEATURE_MALLOC_STATS have been selected when building the source. The default binary build does not enable these.
    -r serverRootDir
    Specify the starting directory for the root of the server. This directory contains AppWeb configuration file.
    -T numPoolThreads
    Specify the number of threads to allocate for the appWeb thread pool. This overrides the ThreadLimit configuration file directive.
    Display the appWeb version number

    Windows Specific Command Options

    On Windows, the appWeb program also supports the following options:

    Run as a console application. This will create a console window. Currently this does not work when invoked directly from a CYGWIN window.
    Run appWeb as a Windows service (daemon). Do not use this switch when invoking appWeb from the command line as it will attempt to connect with the Service Control manager and will hang for 10 seconds before continuing.
    -i "service command line"
    Install appWeb as a windows service. The argument to the -i option is a appWeb set of options to use when the Windows service control manager starts appWeb. The argument to -i is normal "-d" to instruct appWeb to run as a windows service.
    Instruct appWeb to go (start).
    Stop appWeb.
    Uninstall appWeb as a system service.

    © Mbedthis Software LLC, 2003-2204. All rights reserved. Mbedthis is a trademark of Mbedthis Software LLC.