Skip to content

Instantly share code, notes, and snippets.

@centminmod
Forked from kazuho/gist:f15b79211ea76f1bf6e5
Last active August 29, 2015 14:12
Show Gist options
  • Save centminmod/87c50c123da9a52fffa4 to your computer and use it in GitHub Desktop.
Save centminmod/87c50c123da9a52fffa4 to your computer and use it in GitHub Desktop.
h2o --help
h2o version 0.9.0
Usage:
h2o [options]
Options:
-c, --conf FILE configuration file (default: h2o.conf)
-t, --test tests the configuration
-v, --version prints the version number
-h, --help print this help
Configuration File:
The configuration file should be written in YAML format. Below is the list
of configuration directives; the flags indicate at which level the directives
can be used; g=global, h=host, p=path.
hosts: [g]
map of hostname -> map of per-host configs
paths: [h]
map of URL-path -> configuration
limit-request-body: [g]
maximum size of request body in bytes (e.g. content of POST)
(default: unlimited)
http1-request-timeout: [g]
timeout for incoming requests in seconds (default: 10)
http1-upgrade-to-http2: [g]
boolean flag (ON/OFF) indicating whether or not to allow upgrade to HTTP/2
(default: ON)
http2-idle-timeout: [g]
timeout for idle connections in seconds (default: 10)
http2-max-concurrent-requests-per-connection: [g]
max. number of requests to be handled concurrently within a single HTTP/2
stream (default: 16)
listen: [gh]
port at which the server should listen for incoming requests (mandatory)
- if the value is a scalar, it is treated as the port number (or as the
service name)
- if the value is a mapping, following properties are recognized:
port: incoming port number or service name (mandatory)
host: incoming address (default: any address)
ssl: mapping of SSL configuration using the keys below (default: none)
certificate-file: path of the SSL certificate file (mandatory)
key-file: path of the SSL private key file (mandatory)
minimum-version: minimum protocol version, should be one of: SSLv2,
SSLv3, TLSv1, TLSv1.1, TLSv1.2 (default: TLSv1)
- if the value is a sequence, each element should be either a scalar or a
mapping that conform to the requirements above
user: [g]
user under with the server should handle incoming requests (default: none)
max-connections: [g]
max connections (default: 1024)
num-threads: [g]
number of worker threads (default: 1)
access-log: [ghp]
path and optionally the format of the access log (default: none)
- if the value is a scalar, it is treated as the path of the log file
- if the value is a mapping, its `path` property is treated as the path
and `format` property is treated as the format
- if the path starts with `|`, the rest of the path is considered as a
command pipe to which the logs should be emitted
following format strings are recognized:
%h: remote host
%l: remote logname (always '-')
%u: remote user (always '-')
%t: request time
%r: first line of request
%s: status
%b: size of the response body in bytes
%{Foobar}i: the contents of the request header `Foobar`
%{Foobar}o: the contents of the response header `Foobar`
file.dir: [p]
directory under which to serve the target path
file.index: [ghp]
sequence of index file names (default: index.html index.htm index.txt)
file.mime.settypes: [ghp]
map of mime-type -> (extension | sequence-of-extensions)
file.mime.addtypes: [ghp]
map of mime-type -> (extension | sequence-of-extensions)
file.mime.removetypes: [ghp]
sequence of extensions
file.mime.setdefaulttype: [ghp]
default mime-type
file.etag: [ghp]
whether or not to send etag (ON or OFF, default: ON)
file.dirlisting: [ghp]
whether or not to send directory indexes (ON or OFF, default: OFF)
proxy.reverse.url: [p]
upstream URL (only HTTP is suppported)
proxy.keepalive: [ghp]
boolean flag (ON/OFF) indicating whether or not to use persistent
connections to upstream (default: OFF)
proxy.timeout.io: [ghp]
sets upstream I/O timeout (in milliseconds, default: 5000)
proxy.timeout.keepalive: [ghp]
timeout for idle conncections (in milliseconds, default: 2000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment