Nginx proxy and Filepreview
-
Hi all,
I have installed Kopano on Univention server 4.3.0. Kopano (WebApp 3.4.2.1108+36.1) is in local LAN, and on another machine I have Nginx Reverse Proxy with LetsEncrypt. Everything seems work fine, only filepreview (mail attachments) in WebApp not work. It show only blank frame.If I access WebApp by local IP (http://10.128.2.102/webapp), filepreview works OK.
If I access WebApp by domain name (https://mail.my-domain.cz) filepreview show blank frame
There is my nginx config for Kopano:server { server_name mail.my-domain.cz; listen 443 ssl http2; listen [::]:443 ssl http2; include snippets/ssl-my-domain.cz.conf; include snippets/ssl-params.conf; rewrite ^/$ /webapp; location /Microsoft-Server-ActiveSync { proxy_pass http://10.128.2.102/Microsoft-Server-ActiveSync; proxy_set_header X-Forwarded-Host mail.my-domain.cz; } location /webmeetings { proxy_pass http://10.128.2.102/webmeetings; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_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-Host mail.my-domain.cz; } location /webapp { proxy_pass http://10.128.2.102/webapp; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header X-Forwarded-Host mail.my-domain.cz; proxy_set_header Connection $connection_upgrade; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } map $http_upgrade $connection_upgrade { default upgrade; '' close; } proxy_buffering on; proxy_ignore_client_abort off; proxy_redirect off; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; proxy_next_upstream error timeout invalid_header http_502 http_503 http_504;
Firefox Console show this:
Load denied by X-Frame-Options: https://mail.my-domain.cz/webapp/plugins/filepreviewer/external/ViewerJS/index.html?zoom=auto&type=png#https://mail.my-domain.cz/webapp/index.php?load=download_attachment&store=0000000038a1bb1005e5101aa1bb08002b2a56c200007a617261666136636c69656e742e646c6c0000000000c7d733ad6c4b4f37879a18fa4f0fac24010000000100000002322a483b8b4a0c882f09cc8b208c3670736575646f3a2f2f756373322d61707000&entryid=00000000c7d733ad6c4b4f37879a18fa4f0fac24010000000500000016b0ee59644346b1980b7d0de03b1df000000000&attachNum[]=2&dialog_attachments=cSgs2AYgeVpV6vB0cY7AiQGjDgi13utm&contentDispositionType=inline does not permit framing.
Is needed any extra configuration on Kopano? Or extra config on Nginx?
Thanks.