summaryrefslogtreecommitdiff
path: root/roles/nginx/vhost/defaults/main.yml
blob: 834e1e107f2a75b2bd910de39823cd88fbea6a4c (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
# nginx_vhost:
#   default: yes
#   name: example
#   template: generic
#   tls:
#     certificate_provider: acmetool
#   hostnames:
#   - example.com
#   - www.example.com
#   logs:
#     access: /var/log/nginx/example_access.log
#     error: /var/log/nginx/example_error.log
#   extra_directives: |-
#     add_header X-Example-Header "foo";
#   locations:
#     '/':
#       proxy_pass: http://127.0.0.1:8080
#       proxy_redirect:
#       - redirect: "http://$host/"
#         replacement: "https://$host/"
#       - redirect: "http://$host:8080/"
#         replacement: "https://$host/"
#       extra_directives: |-
#         add_header X-Example-Header "foo";
#       proxy_ssl:
#         verify: on
#         trusted_certificate: /path/to/ca.pem

# nginx_vhost:
#   name: mixed-static-and-proxy
#   template: generic
#   tls:
#     variant: legacy
#     hsts: false
#     certificate_provider: acmetool
#     certificate_config:
#       request:
#         challenge:
#           http-self-test: false
#   hostnames:
#   - static.example.com
#   extra_directives: |-
#     add_header X-Example-Header "foo";
#   locations:
#     '/':
#       root: /srv/www/static
#       index: index.html
#       autoindex:
#         format: json
#       extra_directives: |-
#         add_header X-Example-Header "foo";
#     '/subdir/':
#       alias: /srv/www/foo
#     '/private/':
#       return: "403"
#     '/foo/':
#       proxy_pass: http://127.0.0.1:1234
#     '/custom/':
#       custom: |-
#         include fastcgi_params;
#         fastcgi_param SCRIPT_FILENAME /usr/lib/cgi/foo
#         fastcgi_param PATH_INFO       $uri;
#         fastcgi_pass unix:/run/fcgiwrap/foo.sock;

# nginx_vhost:
#   name: example-custom
#   template: generic
#   tls:
#     variant: legacy
#     hsts: false
#     certificate_provider: acmetool
#   hostnames:
#   - static.example.com
#   custom: |-
#     location / {
#       foo "bar";
#     }

# nginx_vhost:
#   name: other-example
#   content: "<<< content of vhost >>>"