Update nginx config for proper listen and health endpoint
This commit is contained in:
parent
89feb4a5ae
commit
064af0661e
1 changed files with 9 additions and 7 deletions
16
nginx.conf
16
nginx.conf
|
|
@ -1,21 +1,23 @@
|
||||||
server {
|
server {
|
||||||
listen 80 default_server;
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri /index.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Disable logging for health checks
|
|
||||||
location = /health {
|
location = /health {
|
||||||
access_log off;
|
|
||||||
return 200 "OK";
|
|
||||||
add_header Content-Type text/plain;
|
add_header Content-Type text/plain;
|
||||||
|
return 200 "OK\n";
|
||||||
|
access_log off;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Gzip compression
|
|
||||||
gzip on;
|
gzip on;
|
||||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml;
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml image/svg+xml;
|
||||||
|
|
||||||
|
access_log off;
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue