### For usage in the same domain name as Nextcloud # static files location ^~ /loleaflet { proxy_pass https://localhost:9980; proxy_set_header Host $http_host; } # WOPI discovery URL location ^~ /hosting { proxy_pass https://localhost:9980; proxy_set_header Host $http_host; } # main websocket location ~ ^/lool/(.*)/ws$ { proxy_pass https://localhost:9980; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $http_host; proxy_read_timeout 36000s; } # download, presentation and image upload location ~ ^/lool { proxy_pass https://localhost:9980; proxy_set_header Host $http_host; } # Admin Console websocket location ^~ /lool/adminws { proxy_pass https://localhost:9980; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $http_host; proxy_read_timeout 36000s; } # Capabilities location ^~ /hosting/capabilities { proxy_pass https://localhost:9980; proxy_set_header Host $http_host; } ### For usage in a separate domain name as Nextcloud server { listen 443 ssl; server_name office.example.com; ssl_certificate /path/to/certficate; ssl_certificate_key /path/to/key; # static files location ^~ /loleaflet { proxy_pass https://localhost:9980; proxy_set_header Host $http_host; } # WOPI discovery URL location ^~ /hosting { proxy_pass https://localhost:9980; proxy_set_header Host $http_host; } # main websocket location ~ ^/lool/(.*)/ws$ { proxy_pass https://localhost:9980; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $http_host; proxy_read_timeout 36000s; } # download, presentation and image upload location ~ ^/lool { proxy_pass https://localhost:9980; proxy_set_header Host $http_host; } # Admin Console websocket location ^~ /lool/adminws { proxy_pass https://localhost:9980; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $http_host; proxy_read_timeout 36000s; } # Capabilities location ^~ /hosting/capabilities { proxy_pass https://localhost:9980; proxy_set_header Host $http_host; } }