Commit 2cf64d3d authored by tywldx's avatar tywldx

fix

parent 5f31c78e
......@@ -99,8 +99,47 @@ function createNginxSSLConf()
echo " }" >> $file_name
echo "}" >> $file_name
rm -rf
}
function createNginxHttpAndSSLConf()
{
cus_domain=$1
cus_ip=$2
cus_port=$3
file_name=$4
rm -rf $file_name
touch $file_name
echo "server {" >> $file_name
echo " server_name $cus_domain.q-gp.com;" >> $file_name
echo "" >> $file_name
echo " location / {" >> $file_name
echo " proxy_pass http://$cus_ip:$cus_port;" >> $file_name
echo " }" >> $file_name
echo "}" >> $file_name
echo "" >> $file_name
echo "server {" >> $file_name
echo " listen 443 ssl;" >> $file_name
echo " server_name $cus_domain.q-gp.com;" >> $file_name
echo "" >> $file_name
echo " ssl_certificate /home/q-gp/ssl/certificate.crt;" >> $file_name
echo " ssl_certificate_key /home/q-gp/ssl/private.key;" >> $file_name
echo "" >> $file_name
echo " ssl_session_cache shared:SSL:1m;" >> $file_name
echo " ssl_session_timeout 5m;" >> $file_name
echo "" >> $file_name
echo " ssl_ciphers HIGH:!aNULL:!MD5;" >> $file_name
echo " ssl_prefer_server_ciphers on;" >> $file_name
echo "" >> $file_name
echo " location / {" >> $file_name
echo " proxy_pass http://$cus_ip:$cus_port;" >> $file_name
echo " }" >> $file_name
echo "}" >> $file_name
}
# projectAndPort=`node $config_server/get_project_config.js -type multi -attr port`
createNginxSSLConf store 172.30.199.2 9000 $nginxname/store.conf
......@@ -115,14 +154,16 @@ do
done
done
for host_name in {0..30}
for host_name in {0..1}
do
projectAndPort=`node $config_server/get_project_config.js -type multi -attr port -attr2 true`
for projectAndPort in ${projectAndPort[@]}
do
var=(${projectAndPort//|/ })
addFrpcSub ${var[0]} http 127.0.0 1 8000 ${var[0]}-qa${host_name} $filename
var=(${projectAndPort//|/ })
addFrpcSub ${var[0]}-${var[2]} http 127.0.0 1 8000 ${var[2]}-qa${host_name} $filename
createNginxHttpAndSSLConf ${var[2]}-qa${host_name} 192.168.6.6 ${var[1]} $nginxname/${var[0]}-${host_name}.conf
done
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment