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

	server_name DOMAIN;
	
    root /var/www/web/sites/PROJECT_FOLDER/docs/.vitepress/dist;

	index index.html index.htm index.nginx-debian.html;

	error_page 404 /404.html;

	location ~ /\.(?!well-known).* {
		deny all;
	}

	location / {
		rewrite ^/(.*)/$ /$1 permanent;
		try_files $uri $uri.html $uri/ /404;
	}

	location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt|webp|woff2|svg)$ {
		try_files $uri /public/$request_uri /404;
	}
}