| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- #welcome page
- rewrite ^/$ $the_scheme://$the_host$the_prefix/welcome/ redirect;
- #script caching protection
- rewrite ^(?<cache>\/web-apps\/apps\/(?!api\/).*)$ $the_scheme://$the_host$the_prefix/8.3.0-$cache_tag$cache redirect;
- #disable caching for api.js
- location ~ ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\w]+)?\/(web-apps\/apps\/api\/documents\/api\.js)$ {
- expires -1;
- gzip_static on;
- alias /var/www/onlyoffice/documentserver/$2;
- }
- #suppress logging the unsupported locale error in web-apps
- location ~ ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\w]+)?\/(web-apps)(\/.*\.json)$ {
- expires 365d;
- error_log /dev/null crit;
- gzip_static on;
- alias /var/www/onlyoffice/documentserver/$2$3;
- }
- #suppress logging the unsupported locale error in plugins
- location ~ ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\w]+)?\/(sdkjs-plugins)(\/.*\.json)$ {
- expires 365d;
- error_log /dev/null crit;
- gzip_static on;
- alias /var/www/onlyoffice/documentserver/$2$3;
- }
- location ~ ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\w]+)?\/(web-apps|sdkjs|sdkjs-plugins|fonts|dictionaries)(\/.*)$ {
- expires 365d;
- gzip_static on;
- alias /var/www/onlyoffice/documentserver/$2$3;
- }
- location ~* ^(\/cache\/files.*)(\/.*) {
- alias /var/lib/onlyoffice/documentserver/App_Data$1;
- add_header Content-Disposition "attachment; filename*=UTF-8''$arg_filename";
- # secure_link disabled for internal preview stability
- }
- # Allow "/internal" interface only from 127.0.0.1
- # Don't comment out the section below for the security reason!
- location ~* ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\w]+)?\/(internal)(\/.*)$ {
- allow 127.0.0.1;
- deny all;
- proxy_pass http://docservice/$2$3;
- }
- # Allow "/info" interface only from 127.0.0.1 by default
- # Comment out lines allow 127.0.0.1; and deny all;
- # of below section to turn on the info page
- location ~* ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\w]+)?\/(info)(\/.*)$ {
- allow 127.0.0.1;
- deny all;
- proxy_pass http://docservice/$2$3;
- }
- location / {
- proxy_pass http://docservice;
- }
- location ~ ^/([\d]+\.[\d]+\.[\d]+[\.|-][\w]+)/(?<path>.*)$ {
- proxy_pass http://docservice/$path$is_args$args;
- proxy_http_version 1.1;
- }
|