diff --git a/CHANGELOG.md b/CHANGELOG.md index b062b833..0a7236c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 (no unreleased versions) +## [3.1.1] - 2021-12-09 +### Fixes +- Let's Encrypt Issue on Nginx Fix +- Domain Edit Issue Fix ## [3.1.0] - 2021-12-09 ### Added diff --git a/app/Jobs/EditSiteDomainSSH.php b/app/Jobs/EditSiteDomainSSH.php index ee2c5a4b..3d43bd4d 100644 --- a/app/Jobs/EditSiteDomainSSH.php +++ b/app/Jobs/EditSiteDomainSSH.php @@ -41,6 +41,7 @@ public function handle() $ssh->login('cipi', $this->site->server->password); $ssh->setTimeout(360); $ssh->exec('echo '.$this->site->server->password.' | sudo -S sudo rpl -i -w "server_name '.$this->olddomain.'" "server_name '.$this->site->domain.'" /etc/nginx/sites-available/'.$this->site->username.'.conf'); + $ssh->exec('echo '.$this->site->server->password.' | sudo -S sudo rpl -i -w "server_name '.$this->olddomain.'" "server_name '.$this->site->domain.'" /etc/nginx/sites-enabled/'.$this->site->username.'.conf'); $ssh->exec('echo '.$this->site->server->password.' | sudo -S sudo systemctl restart nginx.service'); $ssh->exec('exit'); } diff --git a/app/Jobs/SslSiteSSH.php b/app/Jobs/SslSiteSSH.php index 9d863b1a..82748630 100644 --- a/app/Jobs/SslSiteSSH.php +++ b/app/Jobs/SslSiteSSH.php @@ -36,6 +36,9 @@ public function handle() $ssh = new SSH2($this->site->server->ip, 22); $ssh->login('cipi', $this->site->server->password); $ssh->setTimeout(360); + + $ssh->exec('echo '.$this->site->server->password.' | sudo -S sudo fuser -k 80/tcp'); + $ssh->exec('echo '.$this->site->server->password.' | sudo -S sudo fuser -k 443/tcp'); $ssh->exec('echo '.$this->site->server->password.' | sudo -S sudo systemctl restart nginx.service'); $ssh->exec('echo '.$this->site->server->password.' | sudo -S sudo ufw disable'); $ssh->exec('echo '.$this->site->server->password.' | sudo -S sudo certbot --nginx -d '.$this->site->domain.' --non-interactive --agree-tos --register-unsafely-without-email'); @@ -44,6 +47,8 @@ public function handle() $ssh->exec('echo '.$this->site->server->password.' | sudo -S sudo ufw --force enable'); $ssh->exec('echo '.$this->site->server->password.' | sudo -S sudo systemctl restart nginx.service'); foreach ($this->site->aliases as $alias) { + $ssh->exec('echo '.$this->site->server->password.' | sudo -S sudo fuser -k 80/tcp'); + $ssh->exec('echo '.$this->site->server->password.' | sudo -S sudo fuser -k 443/tcp'); $ssh->exec('echo '.$this->site->server->password.' | sudo -S sudo systemctl restart nginx.service'); $ssh->exec('echo '.$this->site->server->password.' | sudo -S sudo ufw disable'); $ssh->exec('echo '.$this->site->server->password.' | sudo -S sudo certbot --nginx -d '.$alias->domain.' --non-interactive --agree-tos --register-unsafely-without-email');