1# This file defines the options that can be used both for the Apache
2# main server configuration, and for the virtual hosts. (The latter
3# has additional options that affect the web server as a whole, like
4# the user/group to run under.)
5
6{ lib }:
7
8with lib;
9
10{
11 options = {
12 proxyPass = mkOption {
13 type = types.nullOr types.str;
14 default = null;
15 example = "http://www.example.org/";
16 description = ''
17 Adds proxy_pass directive and sets recommended proxy headers if
18 recommendedProxySettings is enabled.
19 '';
20 };
21
22 proxyWebsockets = mkOption {
23 type = types.bool;
24 default = false;
25 example = true;
26 description = ''
27 Whether to supporty proxying websocket connections with HTTP/1.1.
28 '';
29 };
30
31 index = mkOption {
32 type = types.nullOr types.str;
33 default = null;
34 example = "index.php index.html";
35 description = ''
36 Adds index directive.
37 '';
38 };
39
40 tryFiles = mkOption {
41 type = types.nullOr types.str;
42 default = null;
43 example = "$uri =404";
44 description = ''
45 Adds try_files directive.
46 '';
47 };
48
49 root = mkOption {
50 type = types.nullOr types.path;
51 default = null;
52 example = "/your/root/directory";
53 description = ''
54 Root directory for requests.
55 '';
56 };
57
58 alias = mkOption {
59 type = types.nullOr types.path;
60 default = null;
61 example = "/your/alias/directory";
62 description = ''
63 Alias directory for requests.
64 '';
65 };
66
67 extraConfig = mkOption {
68 type = types.lines;
69 default = "";
70 description = ''
71 These lines go to the end of the location verbatim.
72 '';
73 };
74 };
75}
76