~dricottone/container-images

ref: e61b929e86a9f7fb86ddc619e5d2a25ced8d3d28 container-images/nginx/README.md -rw-r--r-- 2.3 KiB
e61b929eDominic Ricottone Okay now really things are updated a month ago
                                                                                
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
# nginx


## Build and Deploy

```
make image
```


### Tags

 + `latest`
 + `webdav` for WebDAV support

----

## Use

Can be used with any container manager toolchain.

Create server files in `$confdir`. They should look like:

```
server {
    listen 80 default_server;
    server_name _;

    location / {
        root /usr/share/nginx/html;
    }
}
```

Try:

```
$conman run --detach --name nginx --restart always \
    --mount type=bind,src=$confdir,dst=/etc/nginx/http.d,readonly \
    registry.intra.dominic-ricottone.com/nginx:latest
```

----

## How to use...


### errorpages.conf

`errorpages.conf` adds custom error pages and locations.
Consider adding these to all server.

```
server {
    list 80;
    server_name example.com;

    include errorpages.conf;
}
```


### headers.conf

`headers.conf` adds a set of very common and generally useful headers.
Consider adding these to all locations except on the default server,
and any internal redirect locations.

```
location / {
    include headers.conf;
}
```


### proxy.conf

`proxy.conf` adds a set of headers and enables a set of options that are
useful for redirects and proxies.

```
location / {
    proxy_read_timeout 300s;
    proxy_connect_timeout 75s;
    proxy_pass http://localhost:8080;
    include proxy.conf;
}
```


### fastcgi.conf

`uwsgi.conf` adds a set of headers and enables a set of options that are
useful for FastCGI proxies.

```
location / {
    include fastcgi.conf;
    fastcgi_param SCRIPT_FILENAME /app.cgi;
    fastcgi_param PATH_INFO       $uri;
    fastcgi_param QUERY_STRING    $args;
    fastcgi_param HTTP_HOST       $server_name;
    fastcgi_pass localhost:9000;
}
```



### uwsgi.conf

`uwsgi.conf` adds a set of headers and enables a set of options that are
useful for uWSGI proxies.

```
location / {
    include uwsgi.conf;
    uwsgi_pass localhost:9000;
}
```


### graphql.conf

`graphql.conf` adds a set of headers and enables a set of options that are
useful for GraphQL proxies.

```
location /query {
    proxy_read_timeout 300s;
    proxy_connect_timeout 75s;
    proxy_pass http://localhost:8081;
    include graphql.conf;
}
```


### letsencrypt.conf

`letsencrypt.conf` adds a location for `certbot(8)` integration.

```
server {
    listen 80;
    server_name example.com;

    include letsencrypt.conf;
}
```