server { listen 443 ssl; server_name wevdav.nikita-c.ru; ssl_certificate /etc/letsencrypt/live/wevdav.nikita-c.ru/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/wevdav.nikita-c.ru/privkey.pem; root /var/www/webdav-ui; index index.html; location / { try_files $uri $uri/ /index.html; } location /webdav/ { proxy_pass https://russia.crazedns.ru/webdav/; proxy_set_header Host russia.crazedns.ru; proxy_set_header Authorization $http_authorization; proxy_set_header Depth $http_depth; proxy_set_header Destination $http_destination; proxy_set_header Overwrite $http_overwrite; proxy_set_header If $http_if; client_max_body_size 0; proxy_request_buffering off; proxy_buffering off; } } server { listen 80; server_name wevdav.nikita-c.ru; location /.well-known/acme-challenge/ { root /var/www/letsencrypt; allow all; } location / { return 301 https://$host$request_uri; } }