location ~ ^(\/welcome\/.*)$ {
  expires 365d;
  alias /var/www/onlyoffice/documentserver-example$1;
  index linux.html;
}

location /example/ {
  proxy_pass http://example/;

  proxy_set_header X-Forwarded-Host $the_host;
  proxy_set_header X-Forwarded-Proto $the_scheme;
  proxy_set_header X-Forwarded-Path /example;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

