ervu-lkrp-landing/config/nginx.conf.template

91 lines
2.4 KiB
Text
Raw Permalink Normal View History

2024-12-09 09:51:35 +03:00
log_format nginx_main
2025-03-12 17:06:42 +03:00
'$http_x_real_ip - $remote_user [$time_local] $request '
2024-12-09 09:51:35 +03:00
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" '
'"$request_filename" "$gzip_ratio" $upstream_response_time server: $host : $document_root $fastcgi_script_name ';
server {
listen 80 default;
access_log /var/log/nginx/access.log nginx_main;
error_log /var/log/nginx/error.log error;
sendfile off;
charset utf-8;
2025-01-15 15:15:03 +03:00
2025-01-13 14:33:11 +03:00
server_tokens off;
2024-12-09 09:51:35 +03:00
client_max_body_size 32m;
##
# `gzip` Settings
#
#
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_types
application/atom+xml
application/geo+json
application/javascript
application/x-javascript
application/json
application/ld+json
application/manifest+json
application/rdf+xml
application/rss+xml
application/xhtml+xml
application/xml
font/eot
font/otf
font/ttf
image/svg+xml
text/css
text/javascript
text/plain
text/xml;
root /usr/share/nginx/html;
location / {
index index.html;
expires -1;
add_header Content-Security-Policy "frame-ancestors 'none'; default-src 'self'; connect-src 'self' https://xn--1-6tb.xn--b1afabzvcegckfhg.xn--p1ai/ https://xn--2-6tb.xn--b1afabzvcegckfhg.xn--p1ai/; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:;";
2025-01-15 15:15:03 +03:00
# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|woff2|woff|ttf)$ {
expires 1M;
access_log off;
# max-age must be in seconds
add_header Cache-Control "max-age=2629746, public";
}
# CSS and Javascript
location ~* \.(?:css|js)$ {
expires 1y;
access_log off;
add_header Cache-Control "max-age=31556952, public";
}
2024-12-26 10:48:55 +03:00
2024-12-09 09:51:35 +03:00
ssi on;
set $flUrl "${LKRP_FL_URL}";
set $flLandingUrl "${LKRP_FL_LANDING}";
set $ulUrl "${LKRP_UL_URL}";
2025-01-24 16:29:47 +03:00
set $certUrl "${LKRP_CRT_CHECK_URL}";
2024-12-09 09:51:35 +03:00
try_files $uri $uri/ $uri/index.html;
}
location = /health {
access_log off;
add_header 'Content-Type' 'application/json';
return 200 '{"status":"UP"}';
}
}