2019-07-15 13:57:53 +00:00
|
|
|
map $http_host $this_host {
|
|
|
|
"" $host;
|
|
|
|
default $http_host;
|
|
|
|
}
|
2019-07-05 13:58:04 +00:00
|
|
|
|
2019-07-15 13:57:53 +00:00
|
|
|
map $http_x_forwarded_proto $the_scheme {
|
|
|
|
default $http_x_forwarded_proto;
|
|
|
|
"" $scheme;
|
|
|
|
}
|
2019-07-05 13:58:04 +00:00
|
|
|
|
2019-07-15 13:57:53 +00:00
|
|
|
map $http_x_forwarded_host $the_host {
|
|
|
|
default $http_x_forwarded_host;
|
|
|
|
"" $this_host;
|
|
|
|
}
|
2019-07-05 13:58:04 +00:00
|
|
|
|
2019-12-05 15:26:43 +00:00
|
|
|
map $uri $basename {
|
|
|
|
~/(?<captured_basename>[^/]*)$ $captured_basename;
|
|
|
|
}
|
|
|
|
|
2020-09-29 07:31:27 +00:00
|
|
|
map $request_uri $header_x_frame_options {
|
|
|
|
~*^/(favicon\.ico|products\/files\/share|products\/files\/saveas|products\/files\/filechoice|products\/files\/doceditor|thirdparty\/plugin) "";
|
|
|
|
default "SAMEORIGIN";
|
|
|
|
}
|
|
|
|
|
2021-07-15 09:01:04 +00:00
|
|
|
map $request_uri $cache_control {
|
2023-02-01 10:27:45 +00:00
|
|
|
default "no-cache, no-store, no-transform";
|
2023-02-02 19:20:55 +00:00
|
|
|
~*\/(filehandler\.ashx\?action=thumb)|\/(storage\/room_logos\/root\/|storage\/userPhotos\/root\/) "must-revalidate, no-transform, immutable, max-age=31536000";
|
2023-02-01 17:47:43 +00:00
|
|
|
~*\/(api\/2\.0.*|storage|login\.ashx|filehandler\.ashx|ChunkedUploader.ashx|ThirdPartyAppHandler|apisystem|sh|remoteEntry\.js|debuginfo\.md|static\/scripts.*) "no-cache, no-store, no-transform";
|
2023-02-02 19:20:55 +00:00
|
|
|
~*\/(images|favicon.ico.*)|\.(js|woff|woff2|css)|(locales.*\.json) "must-revalidate, no-transform, immutable, max-age=31536000";
|
2021-07-15 09:01:04 +00:00
|
|
|
}
|
|
|
|
|
2019-12-11 15:15:10 +00:00
|
|
|
include /etc/nginx/includes/onlyoffice-*.conf;
|
|
|
|
|
2022-01-25 09:54:21 +00:00
|
|
|
|
2019-07-15 13:57:53 +00:00
|
|
|
server {
|
|
|
|
listen 8092;
|
|
|
|
|
2020-09-29 07:31:27 +00:00
|
|
|
add_header X-Frame-Options $header_x_frame_options;
|
2021-07-15 09:01:04 +00:00
|
|
|
add_header Cache-Control $cache_control;
|
2021-10-19 08:52:15 +00:00
|
|
|
root $public_root;
|
2021-07-15 09:01:04 +00:00
|
|
|
etag on;
|
2019-07-15 13:57:53 +00:00
|
|
|
|
|
|
|
large_client_header_buffers 4 16k;
|
2021-08-31 15:38:59 +00:00
|
|
|
client_max_body_size 4G;
|
2019-07-15 13:57:53 +00:00
|
|
|
set $X_REWRITER_URL $the_scheme://$the_host;
|
2019-07-05 13:58:04 +00:00
|
|
|
|
2019-07-15 13:57:53 +00:00
|
|
|
if ($http_x_rewriter_url != '') {
|
|
|
|
set $X_REWRITER_URL $http_x_rewriter_url ;
|
2019-07-05 13:58:04 +00:00
|
|
|
}
|
2019-07-15 13:57:53 +00:00
|
|
|
|
2019-08-21 12:31:31 +00:00
|
|
|
gzip on;
|
|
|
|
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
|
|
|
|
|
2019-07-15 13:57:53 +00:00
|
|
|
fastcgi_read_timeout 600;
|
|
|
|
fastcgi_send_timeout 600;
|
|
|
|
fastcgi_keep_conn on;
|
|
|
|
fastcgi_intercept_errors on;
|
2019-07-05 13:58:04 +00:00
|
|
|
|
2019-07-15 13:57:53 +00:00
|
|
|
include fastcgi_params;
|
2019-07-05 13:58:04 +00:00
|
|
|
|
2019-07-15 13:57:53 +00:00
|
|
|
fastcgi_param HTTP_X_REWRITER_URL $http_x_rewriter_url;
|
|
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
|
|
fastcgi_param PATH_INFO "";
|
|
|
|
|
2020-10-09 19:40:06 +00:00
|
|
|
location ~* ^/ds-vpath/ {
|
2022-02-22 15:24:54 +00:00
|
|
|
rewrite /ds-vpath/(.*) /$1 break;
|
2020-10-09 19:40:06 +00:00
|
|
|
|
2022-02-22 15:24:54 +00:00
|
|
|
proxy_pass http://172.18.0.4:80;
|
|
|
|
proxy_redirect off;
|
2020-10-09 19:40:06 +00:00
|
|
|
|
2022-02-22 15:24:54 +00:00
|
|
|
client_max_body_size 100m;
|
2020-10-09 19:40:06 +00:00
|
|
|
|
2022-02-22 15:24:54 +00:00
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
2020-10-09 19:40:06 +00:00
|
|
|
|
2022-02-22 15:24:54 +00:00
|
|
|
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 $the_host/ds-vpath;
|
|
|
|
proxy_set_header X-Forwarded-Proto $the_scheme;
|
2020-10-09 19:40:06 +00:00
|
|
|
|
|
|
|
}
|
2022-07-24 16:57:03 +00:00
|
|
|
|
2019-07-15 13:57:53 +00:00
|
|
|
location / {
|
2022-02-22 15:24:54 +00:00
|
|
|
|
2022-09-07 16:18:43 +00:00
|
|
|
proxy_pass http://127.0.0.1:5001;
|
2022-05-27 11:57:19 +00:00
|
|
|
location ~* /(manifest.json|sw.js|appIcon(.)*\.png|icon.svg|bg-error.png|favicon.ico|debuginfo.md) {
|
2019-12-05 15:26:43 +00:00
|
|
|
try_files /$basename /index.html =404;
|
|
|
|
}
|
2022-02-22 15:24:54 +00:00
|
|
|
|
2021-07-21 15:28:56 +00:00
|
|
|
location ~* /static/fonts/ {
|
|
|
|
try_files /fonts/$basename /index.html =404;
|
|
|
|
}
|
2022-02-22 15:24:54 +00:00
|
|
|
|
2021-07-09 13:16:15 +00:00
|
|
|
location ~* /static/offline/ {
|
|
|
|
try_files /offline/$basename /index.html =404;
|
2021-03-14 20:36:20 +00:00
|
|
|
}
|
2022-02-22 15:24:54 +00:00
|
|
|
|
2021-07-09 13:16:15 +00:00
|
|
|
location ~* /thirdparty/ {
|
|
|
|
try_files /thirdparty/third-party.html /index.html =404;
|
2021-03-29 15:15:10 +00:00
|
|
|
}
|
2022-02-22 15:24:54 +00:00
|
|
|
|
2021-07-09 13:16:15 +00:00
|
|
|
location ~* /static/locales/(?<content>[^/]+) {
|
|
|
|
try_files /locales/$content/$basename /index.html =404;
|
2021-03-29 15:15:10 +00:00
|
|
|
}
|
2021-08-19 10:32:31 +00:00
|
|
|
|
|
|
|
location ~* /static/scripts/ {
|
|
|
|
try_files /scripts/$basename /index.html =404;
|
|
|
|
}
|
|
|
|
|
2022-08-25 11:50:31 +00:00
|
|
|
location ~* /static/plugins/ {
|
|
|
|
try_files /plugins/$basename /index.html =404;
|
|
|
|
}
|
|
|
|
|
2023-02-02 12:17:25 +00:00
|
|
|
location ~* /static/images/(.*)$ {
|
|
|
|
try_files /images/$1 /index.html =404;
|
|
|
|
}
|
|
|
|
|
2019-12-05 15:26:43 +00:00
|
|
|
}
|
2022-07-24 16:57:03 +00:00
|
|
|
|
|
|
|
location /doceditor {
|
|
|
|
|
2022-09-07 16:18:43 +00:00
|
|
|
proxy_pass http://127.0.0.1:5013;
|
2022-07-24 16:57:03 +00:00
|
|
|
proxy_redirect off;
|
|
|
|
proxy_set_header Host $this_host;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
|
|
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
2023-02-02 12:17:25 +00:00
|
|
|
|
|
|
|
location ~* /static/images/(.*)$ {
|
|
|
|
try_files /images/$1 /index.html =404;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~* /static/fonts/ {
|
|
|
|
try_files /fonts/$basename /index.html =404;
|
|
|
|
}
|
2022-07-24 16:57:03 +00:00
|
|
|
}
|
2022-02-22 15:24:54 +00:00
|
|
|
|
2021-07-09 13:16:15 +00:00
|
|
|
location /login {
|
2022-09-02 08:31:35 +00:00
|
|
|
|
2022-09-07 16:18:43 +00:00
|
|
|
proxy_pass http://127.0.0.1:5011;
|
2022-09-02 08:31:35 +00:00
|
|
|
proxy_redirect off;
|
2022-07-22 09:03:16 +00:00
|
|
|
proxy_set_header Host $this_host;
|
2022-09-02 08:31:35 +00:00
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
2022-07-22 09:03:16 +00:00
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
2022-09-02 08:31:35 +00:00
|
|
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
2023-02-02 12:17:25 +00:00
|
|
|
|
|
|
|
location ~* /static/images/(.*)$ {
|
|
|
|
try_files /images/$1 /index.html =404;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~* /static/fonts/ {
|
|
|
|
try_files /fonts/$basename /index.html =404;
|
|
|
|
}
|
2021-02-25 08:44:46 +00:00
|
|
|
}
|
2022-01-25 09:54:21 +00:00
|
|
|
|
2019-12-05 15:26:43 +00:00
|
|
|
location /sockjs-node {
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
proxy_set_header Host $host;
|
2019-07-05 13:58:04 +00:00
|
|
|
|
2022-09-07 16:18:43 +00:00
|
|
|
proxy_pass http://127.0.0.1:5001;
|
2019-07-05 13:58:04 +00:00
|
|
|
|
2019-12-05 15:26:43 +00:00
|
|
|
proxy_redirect off;
|
2019-07-05 13:58:04 +00:00
|
|
|
|
2019-12-05 15:26:43 +00:00
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
}
|
2022-01-20 22:17:01 +00:00
|
|
|
|
2019-12-05 15:26:43 +00:00
|
|
|
location /api/2.0 {
|
2022-10-19 10:12:33 +00:00
|
|
|
location ~* /(files|privacyroom) {
|
2022-09-07 16:18:43 +00:00
|
|
|
proxy_pass http://127.0.0.1:5007;
|
2020-11-03 09:23:17 +00:00
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
|
|
|
}
|
|
|
|
|
2019-12-05 15:26:43 +00:00
|
|
|
location ~* /(people|group) {
|
2022-09-07 16:18:43 +00:00
|
|
|
proxy_pass http://127.0.0.1:5004;
|
2021-02-17 13:41:29 +00:00
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
2020-02-26 10:01:12 +00:00
|
|
|
}
|
2022-02-22 15:24:54 +00:00
|
|
|
|
2022-10-19 10:12:33 +00:00
|
|
|
location ~* /(authentication|modules|portal|security|settings|smtpsettings|capabilities|thirdparty|encryption|feed) {
|
2022-09-07 16:18:43 +00:00
|
|
|
proxy_pass http://127.0.0.1:5000;
|
2020-10-30 10:04:29 +00:00
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
|
|
|
|
|
|
|
location ~* portal/(.*)(backup|restore)(.*) {
|
|
|
|
rewrite (.*)/portal/(.*) $1/backup/$2 break;
|
|
|
|
proxy_redirect off;
|
2022-09-07 16:18:43 +00:00
|
|
|
proxy_pass http://127.0.0.1:5012;
|
2020-10-30 10:04:29 +00:00
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
2020-10-26 13:14:45 +00:00
|
|
|
}
|
2019-07-10 11:57:30 +00:00
|
|
|
|
2022-01-14 13:56:23 +00:00
|
|
|
location ~* authentication/register(.*) {
|
|
|
|
rewrite (.*)/authentication/register(.*) $1/people/register$2 break;
|
|
|
|
proxy_redirect off;
|
2022-09-07 16:18:43 +00:00
|
|
|
proxy_pass http://127.0.0.1:5004;
|
2022-01-14 13:56:23 +00:00
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
|
|
|
}
|
2020-10-30 10:04:29 +00:00
|
|
|
}
|
2022-02-22 15:24:54 +00:00
|
|
|
|
2020-06-25 16:05:14 +00:00
|
|
|
location ~* /backup {
|
2022-09-07 16:18:43 +00:00
|
|
|
proxy_pass http://127.0.0.1:5012;
|
2020-10-30 10:04:29 +00:00
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
2020-02-26 10:01:12 +00:00
|
|
|
}
|
2022-08-24 09:37:33 +00:00
|
|
|
|
|
|
|
location ~* /plugins {
|
2022-09-07 16:18:43 +00:00
|
|
|
proxy_pass http://127.0.0.1:5014;
|
2022-08-24 09:37:33 +00:00
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
|
|
|
}
|
2022-06-05 15:44:37 +00:00
|
|
|
|
|
|
|
location ~* /migration {
|
2022-09-07 16:18:43 +00:00
|
|
|
proxy_pass http://127.0.0.1:5034;
|
2022-06-05 15:44:37 +00:00
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
2020-02-26 10:01:12 +00:00
|
|
|
}
|
2020-10-30 10:04:29 +00:00
|
|
|
}
|
2019-07-15 13:57:53 +00:00
|
|
|
|
2022-06-24 07:32:04 +00:00
|
|
|
location /sso {
|
|
|
|
rewrite sso/(.*) /$1 break;
|
2022-09-07 16:18:43 +00:00
|
|
|
proxy_pass http://127.0.0.1:9834;
|
2022-06-24 07:32:04 +00:00
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
|
|
|
}
|
2022-04-25 18:41:26 +00:00
|
|
|
location ~* /(ssologin.ashx|login.ashx|storage) {
|
2022-09-07 16:18:43 +00:00
|
|
|
proxy_pass http://127.0.0.1:5003;
|
2019-12-05 15:26:43 +00:00
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
|
|
|
}
|
2022-02-22 15:24:54 +00:00
|
|
|
|
2022-01-25 09:54:21 +00:00
|
|
|
location /socket.io/ {
|
2022-09-07 16:18:43 +00:00
|
|
|
proxy_pass http://127.0.0.1:9899;
|
2022-01-25 09:54:21 +00:00
|
|
|
proxy_redirect off;
|
|
|
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
2021-12-09 12:50:50 +00:00
|
|
|
}
|
2022-02-22 15:24:54 +00:00
|
|
|
|
2021-11-19 10:09:09 +00:00
|
|
|
location /backupFileUpload.ashx {
|
2022-09-07 16:18:43 +00:00
|
|
|
proxy_pass http://127.0.0.1:5012;
|
2021-11-19 10:09:09 +00:00
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
2022-05-05 14:07:24 +00:00
|
|
|
}
|
|
|
|
|
2022-11-15 11:11:44 +00:00
|
|
|
location /logoUploader.ashx {
|
|
|
|
proxy_pass http://127.0.0.1:5000;
|
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
|
|
|
}
|
|
|
|
|
2022-05-05 14:07:24 +00:00
|
|
|
location /ThirdPartyApp {
|
2022-09-07 16:18:43 +00:00
|
|
|
proxy_pass http://127.0.0.1:5007;
|
2022-05-05 14:07:24 +00:00
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
2021-11-19 10:09:09 +00:00
|
|
|
}
|
2022-07-24 16:57:03 +00:00
|
|
|
|
2022-12-08 10:24:57 +00:00
|
|
|
|
|
|
|
location /filehandler.ashx {
|
|
|
|
proxy_pass http://127.0.0.1:5007;
|
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
2019-07-15 13:57:53 +00:00
|
|
|
}
|
2022-12-08 10:24:57 +00:00
|
|
|
|
2022-12-06 12:57:19 +00:00
|
|
|
|
2022-12-08 10:24:57 +00:00
|
|
|
location /ChunkedUploader.ashx {
|
|
|
|
proxy_pass http://127.0.0.1:5007;
|
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
|
|
|
}
|
2023-01-17 16:28:39 +00:00
|
|
|
|
2020-05-19 17:41:37 +00:00
|
|
|
location /apisystem {
|
|
|
|
rewrite apisystem/(.*) /$1 break;
|
2022-09-07 16:18:43 +00:00
|
|
|
proxy_pass http://127.0.0.1:5010;
|
2020-05-19 17:41:37 +00:00
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
|
|
|
}
|
2020-05-22 09:41:14 +00:00
|
|
|
|
2022-12-20 10:04:21 +00:00
|
|
|
location /apicache {
|
|
|
|
rewrite apicache/(.*) /$1 break;
|
|
|
|
proxy_pass http://127.0.0.1:5100;
|
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
|
|
|
}
|
|
|
|
|
2020-05-22 09:41:14 +00:00
|
|
|
location /sh {
|
|
|
|
rewrite sh/(.*) /$1 break;
|
2022-09-07 16:18:43 +00:00
|
|
|
proxy_pass http://127.0.0.1:9999;
|
2020-05-22 09:41:14 +00:00
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
2019-07-15 13:57:53 +00:00
|
|
|
}
|
2021-10-19 08:52:15 +00:00
|
|
|
}
|