Repository navigation
Expand file tree
/
Copy pathnginx.conf
More file actions
49 lines (40 loc) · 1.52 KB
/
Copy pathnginx.conf
File metadata and controls
49 lines (40 loc) · 1.52 KB
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
# Global nginx config — designed for non-root operation.
# No 'user' directive: nginx is already running as the nginx user (set via
# Dockerfile USER instruction) so the directive is both unnecessary and
# forbidden when the process doesn't start as root.
worker_processes auto;
pid /tmp/nginx.pid;
events {
worker_connections 1024;
}
http {
# Redirect all temp paths to /tmp so they are always writable by the
# nginx user without needing root-owned /var directories.
client_body_temp_path /tmp/client_body_temp;
proxy_temp_path /tmp/proxy_temp;
fastcgi_temp_path /tmp/fastcgi_temp;
uwsgi_temp_path /tmp/uwsgi_temp;
scgi_temp_path /tmp/scgi_temp;
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent"';
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log warn;
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
server_tokens off;
# Gzip
gzip on;
gzip_vary on;
gzip_min_length 1000;
gzip_proxied any;
gzip_comp_level 6;
gzip_types
text/plain text/css application/json application/javascript
text/xml application/xml application/xml+rss text/javascript
image/svg+xml application/wasm;
include /etc/nginx/conf.d/*.conf;
}