Configure > Quick Start
In order to run the H2O standalone HTTP server, you need to write a configuration file. The minimal configuration file looks like as follows.
listen: port: 8080 user: nobody hosts: "myhost.example.com": paths: /: file.dir: /path/to/the/public-files access-log: /path/to/the/access-log error-log: /path/to/the/error-log pid-file: /path/to/the/pid-file
The configuration instructs the server to:
- listen to port 8080
- under the privileges of
- serve files under
- emit access logs to file:
- emit error logs to
- store the process id of the server in
Enter the command below to start the server.
% sudo h2o -m daemon -c /path/to/the/configuration-file
The command instructs the server to read the configuration file, and start in
daemon mode, which dispatches a pair of master and worker processes that serves the HTTP requests.
To stop the server, send
SIGTERM to the server.
% sudo kill -TERM `cat /path/to/the/pid-file`