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 {
|
2021-10-14 08:26:32 +00:00
|
|
|
default "no-cache, no-store, must-revalidate";
|
2022-05-05 14:07:24 +00:00
|
|
|
~*\/(api\/2\.0.*|storage|login\.ashx|products\/.+\/httphandlers\/filehandler\.ashx|ChunkedUploader.ashx|ThirdPartyAppHandler|apisystem|sh|remoteEntry\.js|debuginfo\.md) "no-cache, no-store, must-revalidate";
|
2021-11-12 16:17:09 +00:00
|
|
|
~*\/(locales.*\.json) "public, no-transform";
|
2021-10-14 08:26:32 +00:00
|
|
|
~*\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|md|css|js)$ "public, no-transform";
|
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;
|
|
|
|
|
|
|
|
add_header Access-Control-Allow-Origin *;
|
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
|
|
|
|
|
|
|
}
|
|
|
|
|
2019-07-15 13:57:53 +00:00
|
|
|
location / {
|
2022-02-22 15:24:54 +00:00
|
|
|
|
2019-07-15 13:57:53 +00:00
|
|
|
proxy_pass http://localhost: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-02 12:33:33 +00:00
|
|
|
location ~* /static/images/icons/(?<content>[^/]+) {
|
|
|
|
try_files /images/icons/$content/$basename /index.html =404;
|
|
|
|
}
|
2022-02-22 15:24:54 +00:00
|
|
|
|
2021-02-19 11:41:19 +00:00
|
|
|
location ~* /static/images/ {
|
2021-07-09 13:16:15 +00:00
|
|
|
try_files /images/$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;
|
|
|
|
}
|
|
|
|
|
2019-12-05 15:26:43 +00:00
|
|
|
}
|
2022-02-22 15:24:54 +00:00
|
|
|
|
2021-07-09 13:16:15 +00:00
|
|
|
location /login {
|
|
|
|
#rewrite login/(.*) /$1 break;
|
|
|
|
proxy_pass http://localhost:5011;
|
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
|
|
|
|
2019-12-05 15:26:43 +00:00
|
|
|
proxy_pass http://localhost: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-02-22 15:24:54 +00:00
|
|
|
|
2019-12-05 15:26:43 +00:00
|
|
|
location /api/2.0 {
|
2020-11-05 15:42:23 +00:00
|
|
|
location ~* /(files|encryption|privacyroom) {
|
2020-11-03 09:23:17 +00:00
|
|
|
proxy_pass http://localhost:5007;
|
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
|
|
|
}
|
|
|
|
|
2019-12-05 15:26:43 +00:00
|
|
|
location ~* /(people|group) {
|
2021-02-17 13:41:29 +00:00
|
|
|
proxy_pass http://localhost:5004;
|
|
|
|
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
|
|
|
|
2020-11-11 15:02:38 +00:00
|
|
|
location ~* /(authentication|modules|portal|security|settings|smtpsettings|capabilities|thirdparty) {
|
2020-10-30 10:04:29 +00:00
|
|
|
proxy_pass http://localhost:5000;
|
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
|
|
|
|
|
|
|
location ~* portal/(.*)(backup|restore)(.*) {
|
|
|
|
rewrite (.*)/portal/(.*) $1/backup/$2 break;
|
|
|
|
proxy_redirect off;
|
|
|
|
|
|
|
|
proxy_pass http://localhost:5012;
|
|
|
|
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;
|
|
|
|
|
|
|
|
proxy_pass http://localhost:5004;
|
|
|
|
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 {
|
2020-10-30 10:04:29 +00:00
|
|
|
proxy_pass http://localhost:5012;
|
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
2022-06-05 15:44:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
location ~* /migration {
|
|
|
|
proxy_pass http://localhost:5034;
|
|
|
|
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;
|
|
|
|
proxy_pass http://localhost:9834;
|
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
|
|
|
}
|
2022-04-25 18:41:26 +00:00
|
|
|
location ~* /(ssologin.ashx|login.ashx|storage) {
|
2019-12-05 15:26:43 +00:00
|
|
|
proxy_pass http://localhost:5003;
|
|
|
|
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-02-14 15:41:15 +00:00
|
|
|
proxy_pass http://localhost: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 {
|
|
|
|
proxy_pass http://localhost:5012;
|
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
2022-05-05 14:07:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
location /ThirdPartyApp {
|
|
|
|
proxy_pass http://localhost:5007;
|
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
2021-11-19 10:09:09 +00:00
|
|
|
}
|
2021-02-24 07:30:42 +00:00
|
|
|
|
2020-02-26 08:04:26 +00:00
|
|
|
location /products {
|
2019-12-05 15:26:43 +00:00
|
|
|
location ~* /people {
|
|
|
|
#rewrite products/people/(.*) /$1 break;
|
|
|
|
proxy_pass http://localhost:5002;
|
2019-09-09 13:28:43 +00:00
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
2020-02-26 08:04:26 +00:00
|
|
|
|
2021-02-19 16:27:13 +00:00
|
|
|
location ~* /(sockjs-node) {
|
|
|
|
rewrite products/people(.*)/(sockjs-node)/(.*) /$2/$3 break;
|
2019-12-05 15:26:43 +00:00
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
proxy_set_header Host $host;
|
2020-02-26 08:04:26 +00:00
|
|
|
|
2019-12-05 15:26:43 +00:00
|
|
|
proxy_pass http://localhost:5002;
|
2020-02-26 08:04:26 +00:00
|
|
|
|
2019-12-05 15:26:43 +00:00
|
|
|
proxy_redirect off;
|
2020-02-26 08:04:26 +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-02-22 15:24:54 +00:00
|
|
|
|
2019-12-05 15:26:43 +00:00
|
|
|
|
2020-02-25 06:58:09 +00:00
|
|
|
location ~* /(manifest.json|service-worker.js|appIcon.png|bg-error.png) {
|
|
|
|
try_files /$basename /index.html =404;
|
|
|
|
}
|
|
|
|
}
|
2022-02-22 15:24:54 +00:00
|
|
|
|
2021-07-09 13:16:15 +00:00
|
|
|
location ~* /files/doceditor {
|
|
|
|
#rewrite products/files/doceditor/(.*) /$1 break;
|
|
|
|
proxy_pass http://localhost:5013;
|
|
|
|
proxy_redirect off;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
2019-07-15 11:45:07 +00:00
|
|
|
}
|
2021-03-21 21:34:21 +00:00
|
|
|
|
2022-02-22 15:24:54 +00:00
|
|
|
location ~* /files {
|
|
|
|
#rewrite products/files/(.*) /$1 break;
|
|
|
|
proxy_pass http://localhost:5008;
|
2021-03-21 21:34:21 +00:00
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
|
|
|
|
2021-04-21 16:00:38 +00:00
|
|
|
location ~* /sockjs-node {
|
2022-02-22 15:24:54 +00:00
|
|
|
rewrite products/files(.*)/sockjs-node/(.*) /$2/$3 break;
|
2021-04-21 16:00:38 +00:00
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
2022-02-22 15:24:54 +00:00
|
|
|
proxy_pass http://localhost:5008;
|
2021-04-21 16:00:38 +00:00
|
|
|
proxy_redirect off;
|
|
|
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
}
|
2021-04-21 18:47:27 +00:00
|
|
|
|
|
|
|
location ~* /(manifest.json|service-worker.js|appIcon.png|bg-error.png) {
|
|
|
|
try_files /$basename /index.html =404;
|
|
|
|
}
|
|
|
|
|
2021-03-21 21:34:21 +00:00
|
|
|
location ~* (/httphandlers/filehandler.ashx|ChunkedUploader.ashx) {
|
|
|
|
proxy_pass http://localhost:5007;
|
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
|
|
|
}
|
|
|
|
}
|
2019-07-15 13:57:53 +00:00
|
|
|
}
|
2020-05-19 17:41:37 +00:00
|
|
|
|
|
|
|
location /apisystem {
|
|
|
|
rewrite apisystem/(.*) /$1 break;
|
|
|
|
proxy_pass http://localhost:5010;
|
|
|
|
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
|
|
|
}
|
2020-05-22 09:41:14 +00:00
|
|
|
|
|
|
|
location /sh {
|
|
|
|
rewrite sh/(.*) /$1 break;
|
|
|
|
proxy_pass http://localhost:9999;
|
|
|
|
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
|
|
|
}
|