Appweb | Appweb Service. |
MaServer | The MaServer object. |
MaState | Current configuration parse state. |
void | maAddDirective(MaAppweb *appweb, cchar *directive, MaDirective proc) |
Define a new config directive. | |
void | maAddEndpoint(MaServer *server, HttpEndpoint *endpoint) |
Add a listening endpoint. | |
void | maAddServer(MaAppweb *appweb, struct MaServer *server) |
Add a server. | |
int | maApplyChangedGroup(MaAppweb *appweb) |
Apply the changed group. | |
int | maApplyChangedUser(MaAppweb *appweb) |
Apply the changed user. | |
int | maArchiveLog(cchar *path, int count, int maxSize) |
Archive a log file. | |
int | maConfigureServer(MaServer *server, cchar *configFile, cchar *home, cchar *documents, cchar *ip, int port) |
Configure a web server. | |
MaAppweb* | maCreateAppweb() |
Create the Appweb object. | |
MaServer* | maCreateServer(MaAppweb *appweb, cchar *name) |
Create a MaServer object. | |
void | maGetUserGroup(MaAppweb *appweb) |
Get the user group. | |
int | maLoadModule(MaAppweb *appweb, cchar *name, cchar *libname) |
Load an appweb module. | |
struct MaServer* | maLookupServer(MaAppweb *appweb, cchar *name) |
Lookup a server. | |
int | maMatchDir(HttpConn *conn, HttpRoute *route, int direction) |
Match routine for the dirHandler. | |
int | maParseConfig(MaServer *server, cchar *path, int flags) |
Parse an Appweb configuration file. | |
int | maParseInit(MaAppweb *appweb) |
Initialize the config file parser. | |
MaState* | maPopState(MaState *state) |
Pop the state. | |
MaState* | maPushState(MaState *state) |
Push the state. | |
int | maRunSimpleWebServer(cchar *ip, int port, cchar *home, cchar *documents) |
Create and run a simple web server listening on a single IP address. | |
int | maRunWebServer(cchar *configFile) |
Create and run a web server based on a configuration file. | |
void | maSetAccessLog(HttpRoute *route, cchar *path, cchar *format) |
Define the access log. | |
void | maSetDefaultServer(MaAppweb *appweb, struct MaServer *server) |
Set the default server. | |
int | maSetHttpGroup(MaAppweb *appweb, cchar *group) |
Set the Http Group. | |
int | maSetHttpUser(MaAppweb *appweb, cchar *user) |
Set the Http User. | |
void | maSetServerAddress(MaServer *server, cchar *ip, int port) |
Set the server listen address. | |
void | maSetServerHome(MaServer *server, cchar *path) |
Set the server home directory. | |
int | maStartAccessLogging(HttpRoute *route) |
Start access logging. | |
int | maStartAppweb(MaAppweb *appweb) |
Start Appweb services. | |
int | maStartServer(MaServer *server) |
Start a server. | |
void | maStopAccessLogging(HttpRoute *route) |
Stop access logging. | |
int | maStopAppweb(MaAppweb *appweb) |
Stop Appweb services. | |
void | maStopServer(MaServer *server) |
Stop a server. | |
bool | maValidateServer(MaServer *server) |
Validate the configuration of a server. |
MaDirective | Directive callback function. |
#define | HTTP_NAME MA_SERVER_NAME |
Default web server software identification. | |
#define | MA_MAX_ACCESS_LOG 20971520 |
Access file size (20 MB). | |
#define | MA_MAX_CONFIG_DEPTH 16 |
Max nest of directives in config file. | |
#define | MA_MAX_REWRITE 10 |
Maximum recursive URI rewrites. | |
#define | MA_PARSE_NON_SERVER 0x1 |
Command file being parsed by a utility program. | |
#define | MA_SDB_MEMORY (20 * 1024 * 1024) |
SDB heap memory. | |
#define | MA_SDB_TIMEOUT (20 * 1000) |
SDB busy timeout. | |
#define | MA_UNLOAD_TIMEOUT "5mins" |
Default module inactivity unload timeout. |
Appweb Service.
Define a new config directive.
appweb | Appweb object created via maCreateAppweb |
directive | Directive name. |
proc | Directive callback procedure of the type MaDirective |
Add a listening endpoint.
server | Server object to modify. |
endpoint | Listening endpoint to add to the server. |
Add a server.
appweb | Appweb object created via maCreateAppweb |
server | MaServer object. |
Apply the changed group.
appweb | Appweb object created via maCreateAppweb |
Apply the changed user.
appweb | Appweb object created via maCreateAppweb |
Create the Appweb object.
Get the user group.
appweb | Appweb object created via maCreateAppweb |
Load an appweb module.
appweb | Appweb object created via maCreateAppweb |
name | User name. Must be defined in the system password file. |
libname | Library path name. |
Lookup a server.
appweb | Appweb object created via maCreateAppweb |
name | Server name. |
Match routine for the dirHandler.
conn | Connection object. |
route | Matching route object. |
direction | Set to HTTP_STAGE_TX or HTTP_STAGE_RX. |
Parse an Appweb configuration file.
server | MaServer object created via maCreateServer |
path | Configuration file pathname. |
flags | Parse control flags. Reserved. Set to zero. |
Initialize the config file parser.
appweb | Appweb object created via maCreateAppweb |
Pop the state.
state | Current state. |
Push the state.
state | Current state. |
Define the access log.
route | HttpRoute object for which to define the logging characteristics. |
path | Pathname for the log file. |
format | Log file format. The format string argument defines how Appweb will record HTTP accesses to the access log. The following log format specifiers are supported:
|
Set the default server.
appweb | Appweb object created via maCreateAppweb |
server | MaServer object. |
Set the Http Group.
appweb | Appweb object created via maCreateAppweb |
group | Group name. Must be defined in the system group file. |
Set the Http User.
appweb | Appweb object created via maCreateAppweb |
user | User name. Must be defined in the system password file. |
Set the server listen address.
server | MaServer object created via maCreateServer |
ip | IP address to set for the server. |
port | Port number to use for the server. |
Set the server home directory.
server | MaServer object created via maCreateServer |
path | Path to the directory for the server configuration. |
Start access logging.
route | HttpRoute object. |
Start Appweb services.
appweb | Appweb object created via maCreateAppweb |
Stop access logging.
route | HttpRoute object. |
Stop Appweb services.
appweb | Appweb object created via maCreateAppweb |
Validate the configuration of a server.
server | Server object to validate. |
The MaServer object.
MaAppweb * | appweb | Appweb control object. | |
MprList * | endpoints | List of HttpEndpoints. | |
char * | home | Server root. | |
Http * | http | Http service object (copy of appweb->http). | |
HttpLimits * | limits | Limits for this server. | |
char * | name | Unique name for this server. |
Configure a web server.
server | MaServer object created via maCreateServer |
configFile | File name of the Appweb configuration file (appweb.conf) that defines the web server configuration. |
home | Admin directory for the server. This overrides the value in the config file. |
documents | Default directory for web documents to serve. This overrides the value in the config file. |
ip | IP address to listen on. This overrides the value specified in the config file. |
port | Port address to listen on. This overrides the value specified in the config file. |
Create a MaServer object.
appweb | Http object returned from maCreateAppweb |
name | Name of the web server. This name is used as the initial server name. |
Create and run a simple web server listening on a single IP address.
ip | IP address on which to listen. Set to "0.0.0.0" to listen on all interfaces. |
port | Port number to listen to. |
home | Home directory for the web server. |
documents | Directory containing the documents to serve. |
Create and run a web server based on a configuration file.
configFile | File name of the Appweb configuration file (appweb.conf) that defines the web server configuration. |
Current configuration parse state.
HttpAuth * | auth | Quick alias for route->auth. | |
char * | configDir | Directory containing config file. | |
struct MaState * | current | Current state. | |
int | enabled | True if the current block is enabled. | |
MprFile * | file | Config file handle. | |
char * | filename | Config file name. | |
int | flags | Parsing flags. | |
HttpHost * | host | Current host. | |
char * | key | Current directive being parsed. | |
HttpLimits * | limits | Current limits (host->limits). | |
int | lineNumber | Current line number. | |
struct MaState * | prev | Previous (inherited) state. | |
HttpRoute * | route | Current route. | |
MaServer * | server | Current server. | |
struct MaState * | top | Top level state. |
Archive a log file.
path | Current log file name. |
count | Number of archived log files to preserve. |
maxSize | Reserved. |
Start a server.
server | Object created via maCreateServer |
Stop a server.
server | Object created via maCreateServer |
Directive callback function.
state | Current config parse state. |
key | Directive key name. |
value | Directive key value. |