DocSpace-buildtools/config/nginx/onlyoffice.conf

313 lines
8.7 KiB
Plaintext
Raw Normal View History

2019-07-15 13:57:53 +00:00
map $http_host $this_host {
"" $host;
default $http_host;
}
2019-07-15 13:57:53 +00:00
map $http_x_forwarded_proto $the_scheme {
default $http_x_forwarded_proto;
"" $scheme;
}
2019-07-15 13:57:53 +00:00
map $http_x_forwarded_host $the_host {
default $http_x_forwarded_host;
"" $this_host;
}
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";
}
2019-12-11 15:15:10 +00:00
include /etc/nginx/includes/onlyoffice-*.conf;
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;
2019-07-15 13:57:53 +00:00
large_client_header_buffers 4 16k;
set $X_REWRITER_URL $the_scheme://$the_host;
2019-07-15 13:57:53 +00:00
if ($http_x_rewriter_url != '') {
set $X_REWRITER_URL $http_x_rewriter_url ;
}
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-15 13:57:53 +00:00
include fastcgi_params;
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/ {
rewrite /ds-vpath/(.*) /$1 break;
2020-10-12 09:22:23 +00:00
proxy_pass http://172.18.0.4:80;
2020-10-09 19:40:06 +00:00
proxy_redirect off;
client_max_body_size 100m;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
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;
}
2019-07-15 13:57:53 +00:00
location / {
proxy_pass http://localhost:5001;
2019-12-11 12:18:55 +00:00
location ~* /(manifest.json|service-worker.js|appIcon.png|bg-error.png) {
2019-12-05 15:26:43 +00:00
root $public_root;
try_files /$basename /index.html =404;
}
location ~* /static/images/ {
root $public_root;
try_files /images/$basename /index.html =404;
}
location ~* /static/offline/ {
root $public_root;
try_files /offline/$basename /index.html =404;
}
2019-12-05 15:26:43 +00:00
}
2021-02-25 08:44:46 +00:00
location /login {
proxy_pass http://localhost:5011;
location ~* /locales {
proxy_pass http://localhost:5011;
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-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-12-05 15:26:43 +00:00
proxy_pass http://localhost:5001;
2019-12-05 15:26:43 +00:00
proxy_redirect off;
2019-12-05 15:26:43 +00:00
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
2020-10-30 10:04:29 +00:00
location /api/2.0 {
2020-11-05 15:42:23 +00:00
location ~* /(files|encryption|privacyroom) {
proxy_pass http://localhost:5007;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
2021-02-17 13:41:29 +00:00
location ~* /(people|group) {
proxy_pass http://localhost:5004;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
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
2020-10-30 10:04:29 +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;
2020-02-26 10:01:12 +00:00
}
2020-10-30 10:04:29 +00:00
2021-01-26 17:09:50 +00:00
location ~* /project {
proxy_pass http://localhost:5020;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
2021-01-26 17:36:03 +00:00
location ~* /crm {
proxy_pass http://localhost:5021;
2020-10-30 10:04:29 +00:00
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
2020-10-30 10:04:29 +00:00
}
2019-07-15 13:57:53 +00:00
2019-12-05 15:26:43 +00:00
location /storage {
proxy_pass http://localhost:5003;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
location /login.ashx {
proxy_pass http://localhost:5003;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
Merge branch 'develop' into feature/workspaces # Conflicts: # packages/asc-web-common/src/components/GroupSelector/GroupSelector.stories.js # packages/asc-web-common/src/components/NavMenu/sub-components/header-nav.js # packages/asc-web-common/src/components/NavMenu/sub-components/header.js # packages/asc-web-common/src/components/NavMenu/sub-components/nav-item.js # packages/asc-web-common/src/components/NavMenu/sub-components/nav-logo-item.js # packages/asc-web-common/src/components/PageLayout/index.js # packages/asc-web-common/src/components/PeopleSelector/PeopleSelector.stories.js # packages/asc-web-common/src/components/PrivateRoute/PrivateRoute.js # packages/asc-web-common/src/store/AuthStore.js # packages/asc-web-common/src/store/ModuleStore.js # packages/asc-web-common/src/store/SettingsStore.js # packages/asc-web-common/src/store/UserStore.js # packages/asc-web-common/src/store/auth/actions.js # packages/asc-web-common/src/store/auth/index.js # packages/asc-web-common/src/store/auth/reducer.js # packages/asc-web-common/src/store/auth/selectors.js # products/ASC.Files/Client/config-overrides.js # products/ASC.Files/Client/package.json # products/ASC.Files/Client/src/App.js # products/ASC.Files/Client/src/components/Article/Body/ThirdPartyList.js # products/ASC.Files/Client/src/components/Article/Body/TreeFolders.js # products/ASC.Files/Client/src/components/Article/Body/TreeSettings.js # products/ASC.Files/Client/src/components/Article/Body/index.js # products/ASC.Files/Client/src/components/Article/Header/index.js # products/ASC.Files/Client/src/components/Article/MainButton/index.js # products/ASC.Files/Client/src/components/dialogs/ConnectDialog/index.js # products/ASC.Files/Client/src/components/dialogs/ConvertDialog/index.js # products/ASC.Files/Client/src/components/dialogs/DeleteDialog/index.js # products/ASC.Files/Client/src/components/dialogs/DeleteThirdPartyDialog/index.js # products/ASC.Files/Client/src/components/dialogs/DownloadDialog/index.js # products/ASC.Files/Client/src/components/dialogs/EmptyTrashDialog/index.js # products/ASC.Files/Client/src/components/dialogs/ThirdPartyMoveDialog/index.js # products/ASC.Files/Client/src/components/pages/Home/Section/Body/BadgesFileTile.js # products/ASC.Files/Client/src/components/pages/Home/Section/Body/FilesRowContent.js # products/ASC.Files/Client/src/components/pages/Home/Section/Body/FilesTileContent.js # products/ASC.Files/Client/src/components/pages/Home/Section/Body/index.js # products/ASC.Files/Client/src/components/pages/Home/Section/Filter/index.js # products/ASC.Files/Client/src/components/pages/Home/Section/Header/index.js # products/ASC.Files/Client/src/components/pages/Home/Section/Paging/index.js # products/ASC.Files/Client/src/components/pages/Home/index.js # products/ASC.Files/Client/src/components/pages/Settings/Section/Body/ConnectedClouds.js # products/ASC.Files/Client/src/components/pages/Settings/Section/Body/index.js # products/ASC.Files/Client/src/components/pages/VersionHistory/Section/Body/VersionRow.js # products/ASC.Files/Client/src/components/pages/VersionHistory/Section/Body/index.js # products/ASC.Files/Client/src/components/pages/VersionHistory/index.js # products/ASC.Files/Client/src/components/panels/AddGroupsPanel/index.js # products/ASC.Files/Client/src/components/panels/AddUsersPanel/index.js # products/ASC.Files/Client/src/components/panels/ChangeOwnerPanel/index.js # products/ASC.Files/Client/src/components/panels/EmbeddingPanel/index.js # products/ASC.Files/Client/src/components/panels/NewFilesPanel/index.js # products/ASC.Files/Client/src/components/panels/OperationsPanel/index.js # products/ASC.Files/Client/src/components/panels/SharingPanel/AccessComboBox.js # products/ASC.Files/Client/src/components/panels/SharingPanel/SharingRow.js # products/ASC.Files/Client/src/components/panels/SharingPanel/index.js # products/ASC.Files/Client/src/components/panels/UploadPanel/ShareButton.js # products/ASC.Files/Client/src/components/panels/UploadPanel/index.js # products/ASC.Files/Client/src/components/panels/VersionHistoryPanel/index.js # products/ASC.Files/Client/src/helpers/desktop.js # products/ASC.Files/Client/src/helpers/i18n.js # products/ASC.Files/Client/src/helpers/utils.js # products/ASC.Files/Client/src/index.js # products/ASC.Files/Client/src/store/files/actions.js # products/ASC.Files/Client/src/store/files/reducers.js # products/ASC.Files/Client/src/store/rootReducer.js # products/ASC.People/Client/config-overrides.js # products/ASC.People/Client/package.json # products/ASC.People/Client/src/App.js # products/ASC.People/Client/src/components/Article/Body/index.js # products/ASC.People/Client/src/components/Article/Header/index.js # products/ASC.People/Client/src/components/Article/MainButton/index.js # products/ASC.People/Client/src/components/dialogs/ChangeEmailDialog/index.js # products/ASC.People/Client/src/components/dialogs/ChangePasswordDialog/index.js # products/ASC.People/Client/src/components/dialogs/ChangePhoneDialog/index.js # products/ASC.People/Client/src/components/dialogs/ChangeUserStatusDialog/index.js # products/ASC.People/Client/src/components/dialogs/ChangeUserTypeDialog/index.js # products/ASC.People/Client/src/components/dialogs/DataLossWarningDialog/index.js # products/ASC.People/Client/src/components/dialogs/DeleteProfileEverDialog/index.js # products/ASC.People/Client/src/components/dialogs/DeleteSelfProfileDialog/index.js # products/ASC.People/Client/src/components/dialogs/DeleteUsersDialog/index.js # products/ASC.People/Client/src/components/dialogs/InviteDialog/index.js # products/ASC.People/Client/src/components/dialogs/SendInviteDialog/index.js # products/ASC.People/Client/src/components/pages/GroupAction/Section/Body/index.js # products/ASC.People/Client/src/components/pages/GroupAction/index.js # products/ASC.People/Client/src/components/pages/Home/Section/Body/index.js # products/ASC.People/Client/src/components/pages/Home/Section/Body/userContent.js # products/ASC.People/Client/src/components/pages/Home/Section/Filter/index.js # products/ASC.People/Client/src/components/pages/Home/Section/Header/index.js # products/ASC.People/Client/src/components/pages/Home/Section/Paging/index.js # products/ASC.People/Client/src/components/pages/Home/index.js # products/ASC.People/Client/src/components/pages/Profile/Section/Body/ProfileInfo/ProfileInfo.js # products/ASC.People/Client/src/components/pages/Profile/Section/Body/index.js # products/ASC.People/Client/src/components/pages/Profile/Section/Header/index.js # products/ASC.People/Client/src/components/pages/Profile/index.js # products/ASC.People/Client/src/components/pages/ProfileAction/Section/Body/avatarEditorPage.js # products/ASC.People/Client/src/components/pages/ProfileAction/Section/Body/createAvatarEditorPage.js # products/ASC.People/Client/src/components/pages/ProfileAction/Section/Body/updateUserForm.js # products/ASC.People/Client/src/components/pages/ProfileAction/index.js # products/ASC.People/Client/src/components/pages/Reassign/Section/Header/index.js # products/ASC.People/Client/src/components/pages/Reassign/index.js # products/ASC.People/Client/src/helpers/i18n.js # products/ASC.People/Client/src/helpers/utils.js # products/ASC.People/Client/src/index.js # products/ASC.People/Client/src/store/people/reducers.js # products/ASC.People/Client/src/store/portal/actions.js # products/ASC.People/Client/src/store/portal/reducers.js # products/ASC.People/Client/src/store/profile/actions.js # products/ASC.People/Client/src/store/profile/selectors.js # products/ASC.People/Client/src/store/rootReducer.js # products/ASC.People/Client/yarn.lock # web/ASC.Web.Client/config-overrides.js # web/ASC.Web.Client/package.json # web/ASC.Web.Client/src/App.js # web/ASC.Web.Client/src/components/pages/About/index.js # web/ASC.Web.Client/src/components/pages/Confirm/index.js # web/ASC.Web.Client/src/components/pages/Confirm/sub-components/activateEmail.js # web/ASC.Web.Client/src/components/pages/Confirm/sub-components/activateUser.js # web/ASC.Web.Client/src/components/pages/Confirm/sub-components/changeEmail.js # web/ASC.Web.Client/src/components/pages/Confirm/sub-components/changeOwner.js # web/ASC.Web.Client/src/components/pages/Confirm/sub-components/changePassword.js # web/ASC.Web.Client/src/components/pages/Confirm/sub-components/changePhone.js # web/ASC.Web.Client/src/components/pages/Confirm/sub-components/createUser.js # web/ASC.Web.Client/src/components/pages/Confirm/sub-components/profileRemove.js # web/ASC.Web.Client/src/components/pages/Home/index.js # web/ASC.Web.Client/src/components/pages/PaymentsEnterprise/index.js # web/ASC.Web.Client/src/components/pages/PaymentsEnterprise/sub-components/advantagesContainer.js # web/ASC.Web.Client/src/components/pages/PaymentsEnterprise/sub-components/buttonContainer.js # web/ASC.Web.Client/src/components/pages/PaymentsEnterprise/sub-components/contactContainer.js # web/ASC.Web.Client/src/components/pages/PaymentsEnterprise/sub-components/headerContainer.js # web/ASC.Web.Client/src/components/pages/Settings/Layout/index.js # web/ASC.Web.Client/src/components/pages/Settings/categories/common/custom-titles.js # web/ASC.Web.Client/src/components/pages/Settings/categories/common/customization.js # web/ASC.Web.Client/src/components/pages/Settings/categories/common/language-and-time-zone.js # web/ASC.Web.Client/src/components/pages/Settings/categories/common/whitelabel.js # web/ASC.Web.Client/src/components/pages/Settings/categories/integration/sub-components/consumerModalDialog.js # web/ASC.Web.Client/src/components/pages/Settings/categories/integration/thirdPartyServicesSettings.js # web/ASC.Web.Client/src/components/pages/Settings/categories/security/accessRights.js # web/ASC.Web.Client/src/components/pages/Settings/categories/security/sub-components/admins.js # web/ASC.Web.Client/src/components/pages/Settings/categories/security/sub-components/modules.js # web/ASC.Web.Client/src/components/pages/Settings/categories/security/sub-components/owner.js # web/ASC.Web.Client/src/components/pages/ThirdParty/index.js # web/ASC.Web.Client/src/components/pages/Wizard/index.js # web/ASC.Web.Client/src/helpers/confirmRoute.js # web/ASC.Web.Client/src/helpers/i18n.js # web/ASC.Web.Client/src/helpers/utils.js # web/ASC.Web.Client/src/index.js # web/ASC.Web.Client/src/store/confirm/actions.js # web/ASC.Web.Client/src/store/payments/actions.js # web/ASC.Web.Client/src/store/settings/reducer.js # web/ASC.Web.Client/src/store/settings/selectors.js # web/ASC.Web.Client/src/store/store.js # web/ASC.Web.Client/src/store/wizard/actions.js # web/ASC.Web.Client/yarn.lock # web/ASC.Web.Common/package.json # web/ASC.Web.Common/yarn.lock # web/ASC.Web.Components/package.json # web/ASC.Web.Components/yarn.lock # web/ASC.Web.Login/src/Login.jsx # web/ASC.Web.Login/src/sub-components/register-container.js # yarn.lock
2021-02-24 07:30:42 +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;
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;
2019-12-05 15:26:43 +00:00
proxy_pass http://localhost:5002;
2019-12-05 15:26:43 +00:00
proxy_redirect off;
2019-12-05 15:26:43 +00:00
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
2021-02-19 16:27:13 +00:00
location ~* /locales {
proxy_pass http://localhost:5002;
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-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) {
root $public_root;
try_files /$basename /index.html =404;
}
}
2021-03-05 18:15:48 +00:00
location ~* /files/doceditor {
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";
}
2020-02-25 06:58:09 +00:00
location ~* /files {
#rewrite products/files/(.*) /$1 break;
proxy_pass http://localhost:5008;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
2021-02-19 18:57:01 +00:00
location ~* /sockjs-node {
rewrite products/files(.*)/sockjs-node/(.*) /$2/$3 break;
2020-02-25 06:58:09 +00:00
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://localhost:5008;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
2021-02-19 18:57:01 +00:00
location ~* /locales {
proxy_pass http://localhost:5008;
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";
}
2020-02-25 06:58:09 +00:00
2019-12-11 12:18:55 +00:00
location ~* /(manifest.json|service-worker.js|appIcon.png|bg-error.png) {
2019-12-05 15:26:43 +00:00
root $public_root;
try_files /$basename /index.html =404;
2019-07-15 11:45:07 +00:00
}
2020-04-14 13:32:31 +00:00
2020-04-20 08:08:04 +00:00
location ~* (/httphandlers/filehandler.ashx|ChunkedUploader.ashx) {
2020-04-14 13:32:31 +00:00
proxy_pass http://localhost:5007;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
}
2019-07-15 11:45:07 +00:00
}
2021-01-25 08:42:29 +00:00
location ~* (/crm|/mail/|/calendar|/projects|/talk) {
2021-01-25 08:42:29 +00:00
#rewrite products/people/(.*) /$1 break;
proxy_pass http://localhost:5001;
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
location ~* /(sockjs-node|locales) {
rewrite products/people(.*)/(sockjs-node|locales)/(.*) /$2/$3 break;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://localhost:5001;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location ~* /(manifest.json|service-worker.js|appIcon.png|bg-error.png) {
root $public_root;
try_files /$basename /index.html =404;
}
}
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-12-11 15:15:10 +00:00
}