diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:57:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:57:58 +0000 |
commit | be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97 (patch) | |
tree | 9754ff1ca740f6346cf8483ec915d4054bc5da2d /web/server/h2o/libh2o/srcdoc/configure/quick_start.mt | |
parent | Initial commit. (diff) | |
download | netdata-be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97.tar.xz netdata-be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97.zip |
Adding upstream version 1.44.3.upstream/1.44.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'web/server/h2o/libh2o/srcdoc/configure/quick_start.mt')
-rw-r--r-- | web/server/h2o/libh2o/srcdoc/configure/quick_start.mt | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/web/server/h2o/libh2o/srcdoc/configure/quick_start.mt b/web/server/h2o/libh2o/srcdoc/configure/quick_start.mt new file mode 100644 index 00000000..3ce08697 --- /dev/null +++ b/web/server/h2o/libh2o/srcdoc/configure/quick_start.mt @@ -0,0 +1,66 @@ +? my $ctx = $main::context; +? $_mt->wrapper_file("wrapper.mt", "Configure", "Quick Start")->(sub { + +<p> +In order to run the H2O standalone HTTP server, you need to write a configuration file. +The minimal configuration file looks like as follows. +</p> + +<?= $ctx->{code}->(<< 'EOT') +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 +EOT +?> + +<p> +The configuration instructs the server to: +<ol> +<li>listen to port 8080</li> +<li>under the privileges of <code>nobody</code></li> +<li>serve files under <code>/path/to/the/public-files</code></li> +<li>emit access logs to file: <code>/path/to/the/access-log</code></li> +<li>emit error logs to <code>/path/to/the/error-log</code></li> +<li>store the process id of the server in <code>/path/to/the/pid-file</code> +</ol> +</p> + +<p> +Enter the command below to start the server. +</p> + +<?= $ctx->{code}->(<< 'EOT') +% sudo h2o -m daemon -c /path/to/the/configuration-file +EOT +?> + +<p> +The command instructs the server to read the configuration file, and start in <code>daemon</code> mode, which dispatches a pair of master and worker processes that serves the HTTP requests. +</p> + +<p> +To stop the server, send <code>SIGTERM</code> to the server. +</p> + +<?= $ctx->{code}->(<< 'EOT') +% sudo kill -TERM `cat /path/to/the/pid-file` +EOT +?> + +<h3>Next Step</h3> + +<p> +Now that you know how to start and stop the server, the next step is to learn the <a href="configure.html">configuration directives and their structure</a>, or see <a href="https://github.com/h2o/h2o/wiki#configuration-examples">the configuration examples</a>. +</p> + +</p> + +? }) |