server {
listen 80;
server_name test1.domain.ru;
root /var/www/test1;
...
location ~ \.php$ {
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
...
}
rewrite ^/(.+)$ https://domain.ru permanent;