server { listen 80; server_name site.ru; root /var/www/site.ru; location ~* ^.+\.(txt|css|js|xml)$ { } location / { return 301 https://site.ru$request_uri; } }