File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 55# ######################################################################################
66# ###### Place additional commands below. #######
77# ######################################################################################
8+
9+ # Update nginx configuration to block connections for unsigned (no SSL certificate) domains
10+ for ipaddr in $( ls /usr/local/hestia/data/ips/ 2> /dev/null) ; do
11+ web_conf=" /etc/$WEB_SYSTEM /conf.d/$ipaddr .conf"
12+
13+ if [ " $WEB_SYSTEM " = " nginx" ]; then
14+ cp -f $HESTIA_INSTALL_DIR /nginx/unassigned.inc $web_conf
15+ sed -i ' s/directIP/' $ipaddr ' /g' $web_conf
16+ fi
17+
18+ if [ " $PROXY_SYSTEM " = " nginx" ]; then
19+ echo " [ * ] Adding unassigned hosts configuration to Nginx..."
20+ cat $WEBTPL /$PROXY_SYSTEM /proxy_ip.tpl | \
21+ sed -e " s/%ip%/$ipaddr /g" \
22+ -e " s/%web_port%/$WEB_PORT /g" \
23+ -e " s/%proxy_port%/$PROXY_PORT /g" \
24+ > /etc/$PROXY_SYSTEM /conf.d/$ipaddr .conf
25+ fi
26+ done
You can’t perform that action at this time.
0 commit comments