Skip to content

Commit

Permalink
update vts_mainserver.conf include file and nginx-module-vts custom C…
Browse files Browse the repository at this point in the history
…SS setup
  • Loading branch information
centminmod committed Jun 1, 2015
1 parent 19ef2da commit 5570e3c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
6 changes: 6 additions & 0 deletions config/nginx/vts_mainserver.conf
Expand Up @@ -5,4 +5,10 @@ location /vhost_status {
vhost_traffic_status on;
vhost_traffic_status_display;
vhost_traffic_status_display_format html;
}

location = /vhost_status.html {
allow 127.0.0.1;
#allow YOURIPADDRESS;
deny all;
}
12 changes: 11 additions & 1 deletion inc/nginx_configure.inc
Expand Up @@ -95,6 +95,11 @@ if [[ "$CENTOSVER" = '6.0' || "$CENTOSVER" = '6.1' || "$CENTOSVER" = '6.2' || "$
./tplToDefine.sh ../share/status.template.html > ../src/ngx_http_vhost_traffic_status_module_html.h
# ./tplToDefine.sh ../share/status.compress.html > ../src/ngx_http_vhost_traffic_status_module_html.h
cd ../
# setup /vhost_status.html
cp -a ${DIR_TMP}/nginx-module-vts/share/status.compress.html /usr/local/nginx/html/vhost_status.html
MAINURIHOST=$HN
NEWURI="//${MAINURIHOST}/vhost_status"
sed -i "s|{{uri}}|$NEWURI|" /usr/local/nginx/html/vhost_status.html
elif [[ -d "${DIR_TMP}/nginx-module-vts" && -d "${DIR_TMP}/nginx-module-vts/.git" ]]; then
cd ${DIR_TMP}/nginx-module-vts
git stash
Expand All @@ -106,7 +111,12 @@ if [[ "$CENTOSVER" = '6.0' || "$CENTOSVER" = '6.1' || "$CENTOSVER" = '6.2' || "$
cd util
./tplToDefine.sh ../share/status.template.html > ../src/ngx_http_vhost_traffic_status_module_html.h
# ./tplToDefine.sh ../share/status.compress.html > ../src/ngx_http_vhost_traffic_status_module_html.h
cd ../
cd ../
# setup /vhost_status.html
cp -a ${DIR_TMP}/nginx-module-vts/share/status.compress.html /usr/local/nginx/html/vhost_status.html
MAINURIHOST=$HN
NEWURI="//${MAINURIHOST}/vhost_status"
sed -i "s|{{uri}}|$NEWURI|" /usr/local/nginx/html/vhost_status.html
fi
else
VTSOPT=""
Expand Down

0 comments on commit 5570e3c

Please sign in to comment.