This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
nginx.conf
50 lines (41 loc) · 1.47 KB
/
nginx.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
pid /tmp/nginx.pid;
events {}
http {
# Trenger ikke accesslogger på NAIS siden dette er innebygd i platformen
access_log off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
etag off;
server {
listen 8080;
server_name localhost;
gzip on;
gzip_types application/javascript application/json image/svg+xml text/css;
gzip_vary on;
gzip_proxied no-cache no-store private expired auth;
# Temporary directories for kubernetes "readonlyfilesystem"
client_body_temp_path /tmp/nginx-client-body;
proxy_temp_path /tmp/nginx-proxy;
fastcgi_temp_path /tmp/nginx-fastcgi;
uwsgi_temp_path /tmp/nginx-uwsgi;
scgi_temp_path /tmp/nginx-scgi;
# Health check for NAIS
location = /isAlive {
return 200 "OK";
add_header Content-Type text/plain;
}
# Readiness check for NAIS
location = /isReady {
return 200 "OK";
add_header Content-Type text/plain;
}
location / {
# beholder default root slik at vi kan swappe ut med stock nginx
root /usr/share/nginx/html;
# index index.html index.htm;
# Hvis vi tillater browser-caching vil vi ikke ha nedetidsfri deploy (!)
add_header Cache-Control no-cache;
add_header Access-Control-Allow-Origin *;
}
}
}