server {
listen 80;
listen [::]:80;
server_name my.ru;
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
listen 443;
listen [::]:443;
server_name my.ru;
location / {
proxy_pass https://localhost:22817/;
}
}