.. _clicmd_src_plugins_http_static_static_server_c: =============================================================== Static HTTP Server =============================================================== clear http static cache ------------------------------------------------------------------------- .. code-block:: console clear http static cache [index ] Clear the static http server cache, to force the server to reload content from backing files This command clear the static http server cache .. code-block:: console clear http static cache .. code-block:: console clear http static cache Declaration: ``clear_hss_cache_command`` `src/plugins/http_static/static_server.c line 1559 `_ Implementation: ``hss_clear_cache_command_fn`` http static listener ------------------------------------------------------------------------- .. code-block:: console http static listener [add|del] [uri ] [www-root ] [url-handlers] [cache-size ] [max-age ] [max-req-body-size ] [rx-buff-thresh ] [keepalive-timeout ] [ptr-thresh ] [http1-only] Add static http server listener Add a static http server listener. The listener can be used to serve static files from the www-root directory or to handle requests using url handlers. .. code-block:: console http static listener www-root /tmp/www uri tcp://0.0.0.0/80 cache-size 2m .. code-block:: console http static listener [uri ] [www-root ] [url-handlers] [cache-size ] [max-age ] [max-req-body-size ] [rx-buff-thresh ] [keepalive-timeout ] [ptr-thresh ] [http1-only] Declaration: ``hss_add_del_listener_command`` `src/plugins/http_static/static_server.c line 1385 `_ Implementation: ``hss_add_del_listener_command_fn`` http static server ------------------------------------------------------------------------- .. code-block:: console http static server [private-segment-size ] [fifo-size ] [prealloc-fifos ] [debug ] [uri ] [www-root ] [url-handlers] [cache-size ] [max-age ] [max-req-body-size ] [rx-buff-thresh ] [keepalive-timeout ] [ptr-thresh ] [http1-only] Enable the static http server This command enables the static http server. Listeners can be added later .. code-block:: console http static server www-root /tmp/www uri tcp://0.0.0.0/80 cache-size 2m .. code-block:: console http static server [private-segment-size ] [fifo-size ] [prealloc-fifos ] [debug ] [uri ] [www-root ] [url-handlers] [cache-size ] [max-age ] [max-req-body-size ] [rx-buff-thresh ] [keepalive-timeout ] [ptr-thresh ] [http1-only] Declaration: ``hss_create_command`` `src/plugins/http_static/static_server.c line 1249 `_ Implementation: ``hss_create_command_fn`` show http static server ------------------------------------------------------------------------- .. code-block:: console show http static server [sessions] [cache] [listeners] [verbose []] Display static http server cache statistics This command shows the contents of the static http server cache .. code-block:: console show http static server .. code-block:: console show http static server sessions cache [verbose [nn]] Declaration: ``hss_show_command`` `src/plugins/http_static/static_server.c line 1506 `_ Implementation: ``hss_show_command_fn``