Skip to content

Commit

Permalink
http/2 support fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andreapollastri committed May 12, 2020
1 parent 2fc81ae commit 5ee112f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

(no unreleased versions)

## [2.4.5] - 2020-05-12
### Fixed
- Bug fix on `install.sh`, `ApplicationsController.php`, `AliasesController.php`, `hostadd.sh` and `ssl.sh` for http\2 support

## [2.4.4] - 2020-05-11
### Fixed
- Bug fix on `install.sh` for http\2 support
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/AliasesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function ssl($aliascode) {
return abort(403);
}
$ssh->setTimeout(360);
$response = $ssh->exec('echo '.$alias->application->server->password.' | sudo -S sudo sh /cipi/ssl.sh -d '.$alias->domain);
$response = $ssh->exec('echo '.$alias->application->server->password.' | sudo -S sudo sh /cipi/ssl.sh -d '.$alias->domain.' -c '.$alias->domain);
if(strpos($response, '###CIPI###') === false) {
abort(500);
}
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/ApplicationsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public function ssl($appcode) {
return abort(403);
}
$ssh->setTimeout(360);
$response = $ssh->exec('echo '.$application->server->password.' | sudo -S sudo sh /cipi/ssl.sh -d '.$application->domain);
$response = $ssh->exec('echo '.$application->server->password.' | sudo -S sudo sh /cipi/ssl.sh -d '.$application->domain.' -c '.$application->username);
if(strpos($response, '###CIPI###') === false) {
abort(500);
}
Expand Down
2 changes: 1 addition & 1 deletion storage/app/scripts/haget.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ server {
deny all;
}

listen 443 ssl http2;
listen 443 http2;

}
2 changes: 0 additions & 2 deletions storage/app/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,6 @@ server {
listen 80 default_server;
listen [::]:80 default_server;
listen 443 ssl;
listen [::]:443 ssl;
root /var/www/html;
Expand Down
7 changes: 6 additions & 1 deletion storage/app/scripts/ssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ while [ -n "$1" ] ; do
shift
DOMAIN=$1
;;
-c | --config )
shift
CONFIG=$1
;;
* )
echo "ERROR: Unknown option: $1"
exit -1
Expand All @@ -16,8 +20,9 @@ while [ -n "$1" ] ; do
shift
done


sudo certbot --nginx -d $DOMAIN --non-interactive --agree-tos --register-unsafely-without-email
sudo rpl -i -w "[::]:443 ssl" "[::]:443 ssl http2" /etc/nginx/sites-enabled/$CONFIG.conf
sudo rpl -i -w "443 ssl" "443 ssl http2" /etc/nginx/sites-enabled/$CONFIG.conf
sudo systemctl restart nginx.service


Expand Down

0 comments on commit 5ee112f

Please sign in to comment.