Skip to content

Instantly share code, notes, and snippets.

@EdsonAlcala
Created May 14, 2016 04:04
Show Gist options
  • Save EdsonAlcala/7c6602a305a1a0717b4cf51ef6d1c928 to your computer and use it in GitHub Desktop.
Save EdsonAlcala/7c6602a305a1a0717b4cf51ef6d1c928 to your computer and use it in GitHub Desktop.
#update packages
sudo apt-get update
#install nginx
sudo apt-get install nginx
#configure
sudo vi /etc/nginx/sites-available/default
#if you have a custom domain replace example.com with your domain
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://APP_PRIVATE_IP_ADDRESS:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
#restart nginx
service nginx restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment