Nginx: static config
This commit is contained in:
parent
5bf9bfae27
commit
f3ec5bb0e0
@ -1,3 +1,6 @@
|
||||
PUSHD %~dp0
|
||||
call runasadmin.bat "%~dpnx0"
|
||||
if %errorlevel% == 0 (
|
||||
PUSHD %~dp0..
|
||||
|
||||
REM call yarn wipe
|
||||
@ -9,4 +12,19 @@ call yarn build
|
||||
REM call yarn wipe
|
||||
call yarn deploy
|
||||
|
||||
xcopy config\nginx\sites-enabled\* build\deploy\nginx\sites-enabled\ /E /R /Y
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-calendar.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.Calendar\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-calendar.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-crm.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.CRM\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-crm.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-editor.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.Files\editor' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-editor.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-files.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.Files\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-files.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-login.conf) -replace 'ROOTPATH', '%~dp0deploy\studio\login' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-login.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-mail.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.Mail\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-mail.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-people.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.People\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-people.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-projects.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.Projects\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-projects.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-studio.conf) -replace 'ROOTPATH', '%~dp0deploy\studio\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-studio.conf"
|
||||
|
||||
call sc stop nginx
|
||||
call sc start nginx
|
||||
|
||||
pause
|
||||
)
|
@ -115,7 +115,7 @@ server {
|
||||
}
|
||||
|
||||
location /login {
|
||||
#rewrite login/(.*) /$1 break;
|
||||
rewrite login/(.*) /$1 break;
|
||||
proxy_pass http://localhost:5011;
|
||||
}
|
||||
|
||||
@ -200,7 +200,7 @@ server {
|
||||
|
||||
location /products {
|
||||
location ~* /people {
|
||||
#rewrite products/people/(.*) /$1 break;
|
||||
rewrite products/people/(.*) /$1 break;
|
||||
proxy_pass http://localhost:5002;
|
||||
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
||||
|
||||
@ -227,7 +227,7 @@ server {
|
||||
}
|
||||
|
||||
location ~* /files/doceditor {
|
||||
#rewrite products/files/doceditor/(.*) /$1 break;
|
||||
rewrite products/files/doceditor/(.*) /$1 break;
|
||||
proxy_pass http://localhost:5013;
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host $host;
|
||||
@ -240,7 +240,7 @@ server {
|
||||
}
|
||||
|
||||
location ~* /files {
|
||||
#rewrite products/files/(.*) /$1 break;
|
||||
rewrite products/files/(.*) /$1 break;
|
||||
proxy_pass http://localhost:5008;
|
||||
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
||||
|
||||
@ -271,7 +271,7 @@ server {
|
||||
}
|
||||
|
||||
location ~* /crm {
|
||||
#rewrite products/crm/(.*) /$1 break;
|
||||
rewrite products/crm/(.*) /$1 break;
|
||||
proxy_pass http://localhost:5014;
|
||||
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
||||
|
||||
@ -303,7 +303,7 @@ server {
|
||||
}
|
||||
|
||||
location ~* /projects {
|
||||
#rewrite products/projects/(.*) /$1 break;
|
||||
rewrite products/projects/(.*) /$1 break;
|
||||
proxy_pass http://localhost:5015;
|
||||
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
||||
|
||||
@ -335,7 +335,7 @@ server {
|
||||
}
|
||||
|
||||
location ~* /mail {
|
||||
#rewrite products/mail/(.*) /$1 break;
|
||||
rewrite products/mail/(.*) /$1 break;
|
||||
proxy_pass http://localhost:5016;
|
||||
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
||||
|
||||
@ -367,7 +367,7 @@ server {
|
||||
}
|
||||
|
||||
location ~* /calendar {
|
||||
#rewrite products/calendar/(.*) /$1 break;
|
||||
rewrite products/calendar/(.*) /$1 break;
|
||||
proxy_pass http://localhost:5017;
|
||||
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
||||
|
||||
|
9
config/nginx/sites-enabled/onlyoffice-calendar.conf
Normal file
9
config/nginx/sites-enabled/onlyoffice-calendar.conf
Normal file
@ -0,0 +1,9 @@
|
||||
server {
|
||||
listen 5017;
|
||||
root "ROOTPATH";
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html =404;
|
||||
}
|
||||
}
|
9
config/nginx/sites-enabled/onlyoffice-crm.conf
Normal file
9
config/nginx/sites-enabled/onlyoffice-crm.conf
Normal file
@ -0,0 +1,9 @@
|
||||
server {
|
||||
listen 5014;
|
||||
root "ROOTPATH";
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html =404;
|
||||
}
|
||||
}
|
9
config/nginx/sites-enabled/onlyoffice-editor.conf
Normal file
9
config/nginx/sites-enabled/onlyoffice-editor.conf
Normal file
@ -0,0 +1,9 @@
|
||||
server {
|
||||
listen 5013;
|
||||
root "ROOTPATH";
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html =404;
|
||||
}
|
||||
}
|
9
config/nginx/sites-enabled/onlyoffice-files.conf
Normal file
9
config/nginx/sites-enabled/onlyoffice-files.conf
Normal file
@ -0,0 +1,9 @@
|
||||
server {
|
||||
listen 5008;
|
||||
root "ROOTPATH";
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html =404;
|
||||
}
|
||||
}
|
9
config/nginx/sites-enabled/onlyoffice-login.conf
Normal file
9
config/nginx/sites-enabled/onlyoffice-login.conf
Normal file
@ -0,0 +1,9 @@
|
||||
server {
|
||||
listen 5011;
|
||||
root "ROOTPATH";
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html =404;
|
||||
}
|
||||
}
|
9
config/nginx/sites-enabled/onlyoffice-mail.conf
Normal file
9
config/nginx/sites-enabled/onlyoffice-mail.conf
Normal file
@ -0,0 +1,9 @@
|
||||
server {
|
||||
listen 5016;
|
||||
root "ROOTPATH";
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html =404;
|
||||
}
|
||||
}
|
9
config/nginx/sites-enabled/onlyoffice-people.conf
Normal file
9
config/nginx/sites-enabled/onlyoffice-people.conf
Normal file
@ -0,0 +1,9 @@
|
||||
server {
|
||||
listen 5002;
|
||||
root "ROOTPATH";
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html =404;
|
||||
}
|
||||
}
|
9
config/nginx/sites-enabled/onlyoffice-projects.conf
Normal file
9
config/nginx/sites-enabled/onlyoffice-projects.conf
Normal file
@ -0,0 +1,9 @@
|
||||
server {
|
||||
listen 5015;
|
||||
root "ROOTPATH";
|
||||
index index.html;
|
||||
|
||||
location /products/projects {
|
||||
try_files $uri /index.html =404;
|
||||
}
|
||||
}
|
9
config/nginx/sites-enabled/onlyoffice-studio.conf
Normal file
9
config/nginx/sites-enabled/onlyoffice-studio.conf
Normal file
@ -0,0 +1,9 @@
|
||||
server {
|
||||
listen 5001;
|
||||
root "ROOTPATH";
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html =404;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user