File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,15 @@ class CoCreateNginx {
2222 await exec ( 'nginx -v' ) ;
2323 } catch ( error ) {
2424 console . log ( 'Nginx not found, installing...' ) ;
25- await exec ( 'sudo apt-get update && sudo apt-get install -y nginx' ) ;
25+ // Add Nginx repository
26+ await exec ( 'echo "deb http://nginx.org/packages/ubuntu $(lsb_release -cs) nginx" | sudo tee /etc/apt/sources.list.d/nginx.list' ) ;
27+ await exec ( 'echo "deb-src http://nginx.org/packages/ubuntu $(lsb_release -cs) nginx" | sudo tee -a /etc/apt/sources.list.d/nginx.list' ) ;
28+ await exec ( 'curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -' ) ;
29+ await exec ( 'sudo apt-get update' ) ;
30+ await exec ( 'sudo apt-get install -y nginx' ) ;
2631 await exec ( "sudo ufw allow 'Nginx Full'" ) ;
32+ // await exec('sudo apt-get update && sudo apt-get install -y nginx');
33+ // await exec("sudo ufw allow 'Nginx Full'");
2734 }
2835
2936 let stream = `user www-data;
You can’t perform that action at this time.
0 commit comments