Skip to content

Commit

Permalink
Separate dashboards location (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
sk81biz authored Jul 9, 2024
2 parents 6d0c14e + 58f8ef4 commit 2813bd5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
12 changes: 12 additions & 0 deletions config/nginx/includes/server-dashboards.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
location ^~ /dashboards/ {
auth_basic "Restricted Access";
auth_basic_user_file /etc/nginx/.htpasswd_dashboards;

rewrite ^/dashboards(/.*)$ $1 break;
proxy_pass http://127.0.0.1:5601;
proxy_redirect off;
proxy_buffering off;

proxy_set_header Connection "Keep-Alive";
proxy_set_header Proxy-Connection "Keep-Alive";
}
13 changes: 1 addition & 12 deletions config/nginx/onlyoffice.conf
Original file line number Diff line number Diff line change
Expand Up @@ -168,18 +168,7 @@ server {

}

location ^~ /dashboards/ {
auth_basic "Restricted Access";
auth_basic_user_file /etc/nginx/.htpasswd_dashboards;

rewrite ^/dashboards(/.*)$ $1 break;
proxy_pass http://127.0.0.1:5601;
proxy_redirect off;
proxy_buffering off;

proxy_set_header Connection "Keep-Alive";
proxy_set_header Proxy-Connection "Keep-Alive";
}
include /etc/nginx/includes/server-*.conf;

location / {
proxy_pass http://127.0.0.1:5001;
Expand Down
4 changes: 2 additions & 2 deletions install/docker/Dockerfile.app
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ RUN cd ${SRC_PATH} && \
cd ${SRC_PATH} && \
cp buildtools/config/*.config /app/onlyoffice/config/ && \
mkdir -p /etc/nginx/conf.d && cp -f buildtools/config/nginx/onlyoffice*.conf /etc/nginx/conf.d/ && \
mkdir -p /etc/nginx/includes/ && cp -f buildtools/config/nginx/includes/onlyoffice*.conf /etc/nginx/includes/ && \
mkdir -p /etc/nginx/includes/ && cp -f buildtools/config/nginx/includes/onlyoffice*.conf /etc/nginx/includes/ && cp -f buildtools/config/nginx/includes/server-*.conf /etc/nginx/includes/ && \
sed -i "s/\"number\".*,/\"number\": \"${PRODUCT_VERSION}.${BUILD_NUMBER}\",/g" /app/onlyoffice/config/appsettings.json && \
sed -e 's/#//' -i /etc/nginx/conf.d/onlyoffice.conf && \
cd ${SRC_PATH}/buildtools/install/common/ && \
Expand Down Expand Up @@ -173,7 +173,7 @@ RUN sed -i 's/127.0.0.1:5010/$service_api_system/' /etc/nginx/conf.d/onlyoffice.
if [[ -z "${SERVICE_CLIENT}" ]] ; then sed -i 's/127.0.0.1:5001/$service_client/' /etc/nginx/conf.d/onlyoffice.conf; fi && \
if [[ -z "${SERVICE_MANAGEMENT}" ]] ; then sed -i 's/127.0.0.1:5015/$service_management/' /etc/nginx/conf.d/onlyoffice.conf; fi && \
sed -i 's/127.0.0.1:5033/$service_healthchecks/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/127.0.0.1:5601/$dashboards_host:5601/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/127.0.0.1:5601/$dashboards_host:5601/' /etc/nginx/includes/server-dashboards.conf && \
sed -i 's/$public_root/\/var\/www\/public\//' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/http:\/\/172.*/$document_server;/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i '/client_body_temp_path/ i \ \ \ \ $MAP_HASH_BUCKET_SIZE' /etc/nginx/nginx.conf.template && \
Expand Down

0 comments on commit 2813bd5

Please sign in to comment.