about summary refs log tree commit diff stats
path: root/tools/httpd.html
blob: affb121c22cea570e068c2eee436c22beb0d8250 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html dir="ltr" lang="en">
    <head>
        <meta charset='utf-8'>
        <title>Httpd</title>
    </head>
    <body>

        <a href="index.html">Tools Index</a>

        <h1>Httpd</h1>

        <p>On OpenBSD copy default configuration file;</p>

        <pre>
        # cp /etc/examples/httpd.conf /etc/httpd.conf
        </pre>

        <p>Default configuration looks like this;</p>

        <pre>
        # $OpenBSD: httpd.conf,v 1.20 2018/06/13 15:08:24 reyk Exp $

        server "example.com" {
                listen on * port 80
                location "/.well-known/acme-challenge/*" {
                        root "/acme"
                        request strip 2
                }
                location * {
                        block return 302 "https://$HTTP_HOST$REQUEST_URI"
                }
        }

        server "example.com" {
                listen on * tls port 443
                tls {
                        certificate "/etc/ssl/example.com.fullchain.pem"
                        key "/etc/ssl/private/example.com.key"
                }
                location "/pub/*" {
                        directory auto index
                }
                location "/.well-known/acme-challenge/*" {
                        root "/acme"
                        request strip 2
                }
        }
        </pre>

        <p>Check configuration;</p>

        <pre>
        httpd -n
        </pre>

        <a href="index.html">Tools Index</a>
        <p>
        This is part of the LeetIO System Documentation.
        Copyright (C) 2021
        LeetIO Team.
        See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
        for copying conditions.</p>
    </body>
</html>