Fixup nginx commands

This commit is contained in:
Marcin Jachymiak 2020-01-30 11:40:44 -05:00
parent 08f08f6844
commit daa3b413b3
1 changed files with 7 additions and 2 deletions

View File

@ -16,7 +16,7 @@ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/source
# Apt installations. # Apt installations.
sudo apt-get update sudo apt-get update
sudo apt-get -y install ufw tmux ranger htop nload nginx certbot \ sudo apt-get -y install ufw tmux ranger htop nload nginx certbot \
python-certbot-nginx nodejs gcc g++ make yarn git python-certbot-nginx nodejs gcc g++ make yarn git vim
# Install pm2 # Install pm2
sudo npm i -g pm2 sudo npm i -g pm2
@ -37,6 +37,7 @@ go version
# Install Sia # Install Sia
cwd=$(pwd) cwd=$(pwd)
cd ~/
git clone https://gitlab.com/NebulousLabs/Sia git clone https://gitlab.com/NebulousLabs/Sia
cd Sia && git checkout viewnode && make cd Sia && git checkout viewnode && make
@ -45,12 +46,16 @@ cd $cwd
# Setup nginx config # Setup nginx config
sudo cp ./skynet-nginx.conf /etc/nginx/sites-available/skynet sudo cp ./skynet-nginx.conf /etc/nginx/sites-available/skynet
sudo nginx -t sudo nginx -t
sudo ln -s /etc/nginx/sites-available/skynet /etc/nginx/sites-enabled/skynet
sudo rm /etc/nginx/sites-enabled/default
sudo systemctl reload nginx sudo systemctl reload nginx
# Setup firewall # Setup firewall
# TODO: disable plain HTTP eventually
sudo ufw enable sudo ufw enable
sudo ufw allow ssh
sudo ufw allow 'Nginx Full' sudo ufw allow 'Nginx Full'
sudo ufw delete allow 'Nginx HTTP' sudo ufw allow 'Nginx HTTP'
# Setup skynet frontend. # Setup skynet frontend.
cd ~/ cd ~/