Update sites.inc

This commit is contained in:
2023-11-11 15:32:03 -06:00
parent 496b1c2227
commit cf2cdb47f2

View File

@@ -493,7 +493,7 @@ NEWPROXYSITE_CREATE(){
echo -e "\n${idsCL[LightRed]}New site name already exists!${idsCL[Default]}\n"
exit 1
else
[ "${MAIN_SITE}" != "${SITENAME}" ] && mv ${NM_NGINXPATH}/sites-enabled/${SITENAME}.conf ${nginxconfig}
# [ "${MAIN_SITE}" != "${SITENAME}" ] && mv ${NM_NGINXPATH}/sites-enabled/${SITENAME}.conf ${nginxconfig}
sed -i "/set \$forward_scheme/d" ${nginxconfig}; sed -ie "/server {/a set \$forward_scheme ${PROXYSCHEME};" ${nginxconfig}
sed -i "/set \$server/d" ${nginxconfig}; sed -ie "/set \$forward_scheme/a set \$server \"${PROXYHOST}\";" ${nginxconfig}