예제 #1
0
파일: Edit.php 프로젝트: NukaCode/dasher
 /**
  * Save the site to the database, create a config and add that config to nginx.
  *
  * @param $id
  * @param $request
  *
  * @return bool
  */
 public function handle($id, $request)
 {
     // Make sure the port is free
     if (!$this->verifyPort($id, $request)) {
         return [false, 'Port is already taken by another site!'];
     }
     $site = $this->updateSite($id, $request);
     Nginx::createConfig($site);
     $this->envoy->run('nginx --cmd="reload"');
     return [true, null];
 }
예제 #2
0
파일: Nginx.php 프로젝트: NukaCode/dasher
 protected function createConfig($site)
 {
     $site->updateStatus('Setting up nginx');
     NginxResource::createConfig($site);
 }