Skip to content

Instantly share code, notes, and snippets.

@pablopunk
Last active February 4, 2019 15:38
Show Gist options
  • Save pablopunk/2bf82892497333f8185f2cf5d44ed26a to your computer and use it in GitHub Desktop.
Save pablopunk/2bf82892497333f8185f2cf5d44ed26a to your computer and use it in GitHub Desktop.
Example of a simple nginx config

Edit this file /etc/nginx/sites-available/default and replace all contents with:

server {
  server_name my-domain.xyz;
  root /home/my-username/www;
  
  location /project1 {
    proxy_pass http://localhost:3001;
  }
  
  location /project1-static {
    alias /home/src/project1/static
  }
}

This simple config is compatible with sudo certbot --nginx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment