diff --git a/config/nginx/onlyoffice.conf b/config/nginx/onlyoffice.conf index bac3d9bdb2e..44f9023fb6c 100644 --- a/config/nginx/onlyoffice.conf +++ b/config/nginx/onlyoffice.conf @@ -36,6 +36,7 @@ server { add_header Access-Control-Allow-Origin *; add_header X-Frame-Options $header_x_frame_options; add_header Cache-Control $cache_control; + root $public_root; etag on; large_client_header_buffers 4 16k; @@ -85,42 +86,33 @@ server { proxy_pass http://localhost:5001; location ~* /(manifest.json|sw.js|appIcon.png|bg-error.png|favicon.ico|debuginfo.md) { - root $public_root; try_files /$basename /index.html =404; } location ~* /static/images/icons/(?[^/]+) { - root $public_root; try_files /images/icons/$content/$basename /index.html =404; } location ~* /static/images/ { - root $public_root; try_files /images/$basename /index.html =404; } location ~* /static/fonts/ { - expires 365d; - root $public_root; try_files /fonts/$basename /index.html =404; } location ~* /static/offline/ { - root $public_root; try_files /offline/$basename /index.html =404; } location ~* /thirdparty/ { - root $public_root; try_files /thirdparty/third-party.html /index.html =404; } location ~* /static/locales/(?[^/]+) { - root $public_root; try_files /locales/$content/$basename /index.html =404; } location ~* /static/scripts/ { - root $public_root; try_files /scripts/$basename /index.html =404; } @@ -197,13 +189,11 @@ server { } location /storage { - add_header Cache-Control $cache_control; proxy_pass http://localhost:5003; proxy_set_header X-REWRITER-URL $X_REWRITER_URL; } location /login.ashx { - add_header Cache-Control $cache_control; proxy_pass http://localhost:5003; proxy_set_header X-REWRITER-URL $X_REWRITER_URL; } @@ -232,7 +222,6 @@ server { location ~* /(manifest.json|service-worker.js|appIcon.png|bg-error.png) { - root $public_root; try_files /$basename /index.html =404; } } @@ -270,12 +259,10 @@ server { } location ~* /(manifest.json|service-worker.js|appIcon.png|bg-error.png) { - root $public_root; try_files /$basename /index.html =404; } location ~* (/httphandlers/filehandler.ashx|ChunkedUploader.ashx) { - add_header Cache-Control $cache_control; proxy_pass http://localhost:5007; proxy_set_header X-REWRITER-URL $X_REWRITER_URL; } @@ -302,12 +289,10 @@ server { } location ~* /(manifest.json|service-worker.js|appIcon.png|bg-error.png) { - root $public_root; try_files /$basename /index.html =404; } location ~* (/httphandlers/filehandler.ashx|ChunkedUploader.ashx) { - add_header Cache-Control $cache_control; proxy_pass http://localhost:5007; proxy_set_header X-REWRITER-URL $X_REWRITER_URL; } @@ -334,12 +319,10 @@ server { } location ~* /(manifest.json|service-worker.js|appIcon.png|bg-error.png) { - root $public_root; try_files /$basename /index.html =404; } location ~* (/httphandlers/filehandler.ashx|ChunkedUploader.ashx) { - add_header Cache-Control $cache_control; proxy_pass http://localhost:5007; proxy_set_header X-REWRITER-URL $X_REWRITER_URL; } @@ -366,12 +349,10 @@ server { } location ~* /(manifest.json|service-worker.js|appIcon.png|bg-error.png) { - root $public_root; try_files /$basename /index.html =404; } location ~* (/httphandlers/filehandler.ashx|ChunkedUploader.ashx) { - add_header Cache-Control $cache_control; proxy_pass http://localhost:5007; proxy_set_header X-REWRITER-URL $X_REWRITER_URL; } @@ -398,12 +379,10 @@ server { } location ~* /(manifest.json|service-worker.js|appIcon.png|bg-error.png) { - root $public_root; try_files /$basename /index.html =404; } location ~* (/httphandlers/filehandler.ashx|ChunkedUploader.ashx) { - add_header Cache-Control $cache_control; proxy_pass http://localhost:5007; proxy_set_header X-REWRITER-URL $X_REWRITER_URL; } @@ -411,14 +390,12 @@ server { } location /apisystem { - add_header Cache-Control $cache_control; rewrite apisystem/(.*) /$1 break; proxy_pass http://localhost:5010; proxy_set_header X-REWRITER-URL $X_REWRITER_URL; } location /sh { - add_header Cache-Control $cache_control; rewrite sh/(.*) /$1 break; proxy_pass http://localhost:9999; proxy_set_header X-REWRITER-URL $X_REWRITER_URL; @@ -429,5 +406,4 @@ server { proxy_pass http://localhost:5232; proxy_set_header X-REWRITER-URL $X_REWRITER_URL; } - -} \ No newline at end of file +}