Skip to content

Instantly share code, notes, and snippets.

@nikhresna
Created August 11, 2019 07:28
Show Gist options
  • Save nikhresna/394b13ea96a4f795b8e04a03e5fa35b6 to your computer and use it in GitHub Desktop.
Save nikhresna/394b13ea96a4f795b8e04a03e5fa35b6 to your computer and use it in GitHub Desktop.
#!/bin/bash
# add nginx signing key
sudo wget http://nginx.org/keys/nginx_signing.key
sudo apt-key add nginx_signing.key
echo '================================'
# install nginx
cd /etc/apt
echo 'deb http://nginx.org/packages/ubuntu disco nginx' >> sources.list
echo 'deb-src http://nginx.org/packages/ubuntu disco nginx' >> sources.list
sudo apt-get update
sudo apt-get install nginx
sudo service nginx start
echo '================================'
# setup app dir
cd /var/www/
mkdir kementrian-front-end
echo '================================'
# setup nginx
cd /etc/nginx/sites-available
curl https://gist.githubusercontent.com/nikhresna/c941258df7995d940c29892264ed42ca/raw/4dec79e28accf46e6265c7da2074cf0d78fe8e8f/nginx%2520kementrian-front-end -o kementrian-front-end
sudo ln -s /etc/nginx/sites-available/kementrian-front-end /etc/nginx/sites-enabled/
sudo nginx -s reload
echo '================================'
echo 'Setup successful'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment