diff --git a/nginx/sites-available/cloud.grupopralog.com.br.conf b/nginx/sites-available/cloud.grupopralog.com.br.conf index 81f748a..958274a 100644 --- a/nginx/sites-available/cloud.grupopralog.com.br.conf +++ b/nginx/sites-available/cloud.grupopralog.com.br.conf @@ -213,6 +213,28 @@ server { more_set_headers 'X-APIMicroCache-Status: $upstream_cache_status'; } + location ~ ^/remote\.php/(webdav|dav)/ { + proxy_pass http://nextcloud_backend; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Host $host; + + proxy_http_version 1.1; + proxy_set_header Connection ""; + + # Habilita o streaming de arquivos grandes para o backend + # sem bufferizar o corpo inteiro da requisição no Nginx. + proxy_buffering off; + proxy_request_buffering off; + + # Timeouts longos para uploads/downloads grandes + proxy_connect_timeout 60s; + proxy_read_timeout 1200s; + proxy_send_timeout 1200s; + } + location / { proxy_pass http://nextcloud_backend; proxy_set_header Host $host;