<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><font face="Times" size="4" class="">Dear All,</font><div class=""><font face="Times" size="4" class="">      I am looking for the way to add virtual host dynamically.</font></div><div class=""><font face="Times" size="4" class="">      I have referenced to the implement of </font><span style="font-family: Times; font-size: large;" class="">lwsws</span><span style="font-family: Times; font-size: large;" class="">.</span></div><div class=""><font face="Times" size="4" class="">      For the lwsws  case, the step looks like:</font></div><div class=""><font face="Times" size="4" class="">           1,    create <span style="caret-color: rgb(36, 41, 46); color: rgb(36, 41, 46); white-space: pre; background-color: rgb(255, 255, 255);" class="">lws_context</span></font></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><font color="#24292e" face="Times" size="4" class=""><span style="caret-color: rgb(36, 41, 46); white-space: pre;" class="">           2,    create event loop (for the libuv case)</span></font></span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><font color="#24292e" face="Times" size="4" class=""><span style="white-space: pre;" class="">           3,    create the vhost from config</span></font></span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><font color="#24292e" face="Times" size="4" class=""><span style="white-space: pre;" class="">           4,    start event loop.</span></font></span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><font color="#24292e" face="Times" size="4" class=""><span style="white-space: pre;" class=""><br class=""></span></font></span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><font color="#24292e" face="Times" size="4" class=""><span style="white-space: pre;" class="">     So, For the dynamic add virtual host case, I am trying to implement it as:</span></font></span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><font color="#24292e" face="Times" size="4" class=""><span style="white-space: pre;" class="">            1,   start the host1 as lwsws does;</span></font></span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><font color="#24292e" face="Times" size="4" class=""><span style="white-space: pre;" class="">            2,   call </span></font></span><font color="#24292e" face="Times" size="4" class=""><span style="white-space: pre;" class="">las_create_vhost to create a new vhost2 at http response callback.</span></font></div><div class=""><font color="#24292e" face="Times" size="4" class=""><span style="white-space: pre;" class="">    I am not sure if this is the right thing to do.</span></font></div><div class=""><font color="#24292e" face="Times" size="4" class=""><span style="white-space: pre;" class=""><br class=""></span></font></div><div class=""><font face="Times" size="4" class=""><font color="#24292e" class=""><span style="white-space: pre;" class="">   </span></font>Thanks for any suggestions бн</font></div><div class=""><font face="Times" size="4" class=""><br class=""></font></div><div class=""><font face="Times" size="4" class="">Yours Chropin.</font></div><div class=""><font color="#24292e" face="Times" size="4" class=""><span style="caret-color: rgb(36, 41, 46); white-space: pre;" class=""><br class=""></span></font></div></body></html>