Wrong layout when access from outside LAN

Nextcloud version 19.0.1snap3,
Operating system and version Ubuntu 16.04.7 LTS,
Apache/2.4.18,
PHP 7.4.9

Wrong layout, when accessing Nextcloud from outside, in LAN layout is normal. Ports forwarding to LAN is 443 and 80. Example picture: https://yadi.sk/i/IgHNtK5W80XErA

How to repair this?

Can you check the URL of all the embedded content (web developer -> network). If there is a wrong hostname that can’t be resolved, you probably need to fix the overwrite-url parameter in the config file:

Also check if there is no add-blocker app in your browser that prevents loading this content.