summaryrefslogtreecommitdiff
path: root/src/tools/README
blob: b59a277fe5c14e3edae5f66724c8cd456a4ac4c6 (plain)
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
* httpd with ssl

Run httpd using inets. Tell inets what to start by configuring
'services' in a config file that you pass to erl(1) at startup:

$ cat httpd_inets.config
[{inets, [{services, [
                      {httpd, [{proplist_file, "httpd_inets_props.conf"}]}
                     ]}]}].
$

Then start erl with `-config httpd_inets'.
In erl, start inets:

1> inets.start().
ok

There are two ways to configure the httpd server.

Either configure httpd using a props list with all the httpd arguments:

$ cat httpd_inets_props.conf
[
 {port, 8080},
 {bind_address, {127,0,0,1}},
 {server_name, "httpd_inets_FQDN"},
 {server_root, "/tmp/httpd_inets"},
 {document_root, "/tmp/httpd_inets/docroot"},
 {socket_type, essl},
 {ssl_certificate_file, "/tmp/httpd_inets/02.pem"},
 {ssl_certificate_key_file, "/tmp/httpd_inets/srv1.key"},
 {ssl_ca_certificate_file, "/tmp/httpd_inets/01.pem"}
].
$

In the example config for inets above, this is what will be used.

Or configure httpd using an Apache like configuration file. Configure
inets to start httpd with {file, "httpd_config"} in
httpd_inets.config. Here's a config file equivalent to what's seen
above in the props list:

$ cat httpd_config.OFF
ServerName httpd_inets_FQDN
ServerRoot /tmp/httpd_inets
DocumentRoot /tmp/httpd_inets/docroot
Port 8080
SocketType essl

SSLCertificateFile /tmp/httpd_inets/02.pem
SSLCertificateKeyFile /tmp/httpd_inets/srv1.key
SSLCACertificateFile /tmp/httpd_inets/01.pem
$