server {
	listen 80;
	listen [::]:80;

	server_name pechatalka.svoboda.works;

	# 301 302
	return 301 https://$server_name$request_uri;
}

server {
	listen 443 ssl;
	listen 443 quic;
	listen [::]:443 ssl;
	listen [::]:443 quic;

	server_name pechatalka.svoboda.works;

	http2 on;
	http3 on;
	quic_gso on;
	quic_retry on;

	add_header Alt-Svc 'h3=":$server_port"; ma=86400';
	add_header x-quic 'h3';

	root /var/www/pechatalka.svoboda.works/svoboda/pechatalka/system/public;

	index index.php;

	keepalive_timeout 60;

	include snippets/ssl-params.conf;
	include snippets/ssl-svoboda.conf;
	include snippets/php8_4.conf;

	location / {
		try_files $uri $uri/ /index.php?$query_string;
	}

	location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|woff2|woff)$ {
		expires 1M;
		access_log off;
		add_header Cache-Control "max-age=2629746, public";
	}

	location ~* \.(?:css|js|mjs|min)$ {
		expires 1y;
		access_log off;
		add_header Cache-Control "max-age=31556952, public";
	}
}

