-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx.template.conf
52 lines (40 loc) · 1.36 KB
/
nginx.template.conf
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
# Defines the number of worker processes
worker_processes 1;
events {
# Sets the maximum number of simultaneous connections that can be opened by a worker process
worker_connections 1024;
}
http {
# Don't emit nginx version in the response
server_tokens off;
# Set the mime-types via the mime.types external file
include /etc/nginx/mime.types;
# serve local static files (performance improvement)
sendfile on;
# gzip
gzip on;
gzip_static on;
gzip_vary on;
gzip_types *;
server {
# Make this server the default. deferred is available only on linux
listen 80 default_server deferred;
# Set by the env, e.g. server_name example.org www.example.org;
server_name vlm-frontend;
# App root directory
root /app;
location / {
# Never cache the index.html
add_header Pragma "no-cache";
add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
# Lookup files to render, always falling back to index.html
try_files $uri $uri/ /index.html;
}
location ~* \.(css|js|jpg|jpeg|gif|png|json|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm)$ {
# Sets “Expires” to the value “Thu, 31 Dec 2037 23:55:55 GMT”, and “Cache-Control” to 10 years.
expires max;
# Cancels all access_log directives on the current level
access_log off;
}
}
}