File: etc-lwsws-conf.d-localhost-EXAMPLE

package info (click to toggle)
libwebsockets 2.0.3-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 5,424 kB
  • ctags: 4,865
  • sloc: ansic: 33,281; perl: 1,656; sh: 872; cpp: 226; makefile: 77; awk: 5
file content (180 lines) | stat: -rw-r--r-- 5,432 bytes parent folder | download | duplicates (2)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# comment

{
 "vhosts": [ {
     "name": "libwebsockets.org",
     "port": "443",
     "host-ssl-key":  "/etc/pki/tls/private/libwebsockets.org.key",
     "host-ssl-cert": "/etc/pki/tls/certs/libwebsockets.org.crt",
     "host-ssl-ca":   "/etc/pki/tls/certs/libwebsockets.org.cer",
     "access-log": "/var/log/httpd/lws-access-log",
     "sts": "on",
     "mounts": [{
       "mountpoint": "/",
       "origin": "file:///var/www/libwebsockets.org",
       "default": "index.html",
       "cache-max-age": "60",
       "cache-reuse": "1",
       "cache-revalidate": "1",
       "cache-intermediaries": "0"
       }, {
        # this hooks us up to cgit cgi part
        "mountpoint": "/git",
        "origin": "cgi:///var/www/cgi-bin/cgit",
        "default": "/",
	"cgi-env": [{
		"CGIT_CONFIG": "/etc/cgitrc/git.libwebsockets.org"
	}],
	# we can also set up per-cgi process timeout
	"cgi-timeout": "30"
       }, {
        # this hooks us up to cgit static assets
        "mountpoint": "/git/cgit-data",
        "origin": "file:///usr/share/cgit",
        "default": "/"
        }, {
        "mountpoint": "/mailman",
        "origin": ">https://libwebsockets.org/mailman/listinfo"
       }, {
        "mountpoint": "/mailman/listinfo",
        "origin": "cgi:///usr/lib/mailman/cgi-bin/listinfo"
       }, {
        "mountpoint": "/mailman/admin",
        "origin": "cgi:///usr/lib/mailman/cgi-bin/admin"
       }, {
        "mountpoint": "/mailman/admindb",
        "origin": "cgi:///usr/lib/mailman/cgi-bin/admindb"
       }, {
        "mountpoint": "/mailman/confirm",
        "origin": "cgi:///usr/lib/mailman/cgi-bin/confirm"
       }, {
        "mountpoint": "/mailman/create",
        "origin": "cgi:///usr/lib/mailman/cgi-bin/create"
       }, {
        "mountpoint": "/mailman/edithtml",
        "origin": "cgi:///usr/lib/mailman/cgi-bin/edithtml"
       }, {
        "mountpoint": "/mailman/options",
        "origin": "cgi:///usr/lib/mailman/cgi-bin/options"
       }, {
        "mountpoint": "/mailman/private",
        "origin": "cgi:///usr/lib/mailman/cgi-bin/private"
       }, {
        "mountpoint": "/mailman/rmlist",
        "origin": "cgi:///usr/lib/mailman/cgi-bin/rmlist"
       }, {
        "mountpoint": "/mailman/roster",
        "origin": "cgi:///usr/lib/mailman/cgi-bin/roster"
       }, {
        "mountpoint": "/mailman/subscribe",
        "origin": "cgi:///usr/lib/mailman/cgi-bin/subscribe"
       }, {
        "mountpoint": "/pipermail",
        "origin": "file:///var/lib/mailman/archives/public",
	"default": "index.html"
       }, {
        # we used to have a trac, redirect anyone using it to github
        "mountpoint": "/trac",
        "origin": ">https://github.com/warmcat/libwebsockets"
       }, {
        "mountpoint": "/server-status",
        "origin": "file:///usr/local/share/libwebsockets-test-server/server-status",
        "default": "server-status.html"
       }, {
        "mountpoint": "/testserver",
        "origin": "file:///usr/local/share/libwebsockets-test-server",
        "default": "test.html"
       }
     ],
     # which protocols are enabled for this vhost, and optional
     # vhost-specific config options for the protocol
     #
     "ws-protocols": [{
       "dumb-increment-protocol": {
         "status": "ok"
       },
       "lws-mirror-protocol": {
         "status": "ok"
       },
       "lws-status": {
         "status": "ok"
       },
       "lws-server-status": {
         "status": "ok",
	 "update-ms": "5000"
       }
     }],
     "ws-extensions": [{
       "extension": "permessage-deflate"
     }]
   },

	# redirect any guys coming in on http to https
    {
     "name": "libwebsockets.org",
     "port": "80",
     "sts": "on",
     "mounts": [{
       "mountpoint": "/",
       "origin": ">https://libwebsockets.org"
     }]
   },
    {
	# the old test server ran this on :7681, put a redirect
	# there to take us to the new location
    "name": "libwebsockets.org",
    "port": "7681",
     "host-ssl-key":  "/etc/pki/tls/private/libwebsockets.org.key",
     "host-ssl-cert": "/etc/pki/tls/certs/libwebsockets.org.crt",
     "host-ssl-ca":   "/etc/pki/tls/certs/libwebsockets.org.cer",
     "mounts": [{
       "mountpoint": "/",
       "origin": ">https://libwebsockets.org/testserver/"
     }]
  },

	# old site for mailing list redirect to new one
    {
    "name": "ml.libwebsockets.org",
    "port": "80",
     "mounts": [{
       "mountpoint": "/",
       "origin": ">https://libwebsockets.org/mailman"
     }]
   },
	# old site for mailing list redirect to new one
    {
    "name": "ml.libwebsockets.org",
    "port": "443",
     "mounts": [{
       "mountpoint": "/",
       "origin": ">https://libwebsockets.org/mailman"
     }]
   },


	# redirect any guys coming in on http to https
    {
    "name": "git.libwebsockets.org",
    "port": "80",
     "mounts": [{
       "mountpoint": "/",
       "origin": ">https://libwebsockets.org/git"
     }]
   },
    {
	# the old test server ran this on :7681, put a redirect
	# there to take us to the new location
    "name": "git.libwebsockets.org",
    "port": "443",
     "host-ssl-key":  "/etc/pki/tls/private/libwebsockets.org.key",
     "host-ssl-cert": "/etc/pki/tls/certs/libwebsockets.org.crt",
     "host-ssl-ca":   "/etc/pki/tls/certs/libwebsockets.org.cer",
     "mounts": [{
       "mountpoint": "/",
       "origin": ">https://libwebsockets.org/git"
     }]
   }
 }]
}