summaryrefslogtreecommitdiff
path: root/test/complex.conf
blob: 6dedde1cfa7d8a6ad522da662a87f93151232a3e (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
# Minimum required configuration to do a config test with:
#   /usr/sbin/nginx -p . -c test.conf -T
error_log /tmp/te"st.log error;
pid /tmp/tes't.pid;
events {
    use epoll;
}

pre_set $name abc; #" This is the \$name variable"; # Set a variable

pre_set $b $unknownvar;
test "$b${name}x";

pre_if $name ~* (B)c {
    pre_warn The first pre_if matched and its result is $1;
    the pre_if matched $1;
    pre_set $var 2;
    # Not visible outside of this pre_if block... hmmmm.
}

pre_if "" {
    pre_warn This warn is never called;
}

pre_exec $events "grep events complex.conf \\
                      | head -n 1";
events $events;

pre_include complex.inc;

pre_include /dev/null;

http {
    types {
        image/x-jng     jng;
        image/x-ms-bmp  bmp;
        image/svg+xml   svg svgz;
    }
    location ~ \.php$ {
        something;
    }
    server {
        if "x"{}
    }
    document_root "/var/tmp/\$va\"r .log";
    server_https blicky.net www.blicky.net more.blicky.net {
        hi $something; # not interpolated
    }
}