Skip to content

Instantly share code, notes, and snippets.

@utopictown
Last active October 5, 2020 15:50
Show Gist options
  • Save utopictown/8c2cdce253b31542c77eb186f81af870 to your computer and use it in GitHub Desktop.
Save utopictown/8c2cdce253b31542c77eb186f81af870 to your computer and use it in GitHub Desktop.
touch /etc/nginx/sites-available/your-site.com
// your-site.com
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name your-site.com;
location / {
proxy_pass http://localhost:5000;
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;
}
}
sudo ln -s /etc/nginx/sites-available/your-site.com /etc/nginx/sites-enabled/
sudo service nginx restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment