Skip to content

Instantly share code, notes, and snippets.

@han-wong
Last active September 20, 2021 16:18
Show Gist options
  • Save han-wong/2e9551ba9fe51ee978746bda08a5c90d to your computer and use it in GitHub Desktop.
Save han-wong/2e9551ba9fe51ee978746bda08a5c90d to your computer and use it in GitHub Desktop.
#!/bin/bash
sudo apt install nginx
echo "server {
listen 80;
server_name marlene;
location / {
proxy_pass http://127.0.0.1:5560/;
}
}" | sudo tee /etc/nginx/conf.d/marlene.conf
cat /etc/hosts > temphostsfile ;
echo "127.0.0.1 marlene" | sudo tee /etc/hosts ;
cat temphostsfile | sudo tee -a /etc/hosts ;
sudo rm temphostsfile ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment