Setup Nginx

Start Nginx

systemctl enable nginx
systemctl start nginx

# or in docker
nginx

Create a Nginx Configuration

Attention
Ensure the name of the nginx file is as shown below or requests will not restart correctly.

Replace example.com with your URL

cat > /etc/nginx/sites-enabled/atlas-requests.conf << EOF
server {
  server_name example.com;
  location / {
    proxy_pass http://localhost:3000;
  }
}
EOF

If you plan to use https you can add a cert (note that certs in nginx should be “full chain”, not just the final cert.):

cat > /etc/nginx/sites-enabled/atlas-requests.conf << EOF
server {
  server_name example.com;
  location / {
    proxy_pass http://localhost:3000;
  }

    listen 443 ssl;
    ssl_certificate /etc/certs/fullchain.pem;
    ssl_certificate_key /etc/certs/privkey.pem;
}
server {
    if (\$host = example.com) {
        return 301 https://\$host\$request_uri;
    }
  listen 80;
  server_name example.com;
    return 404;
}
EOF

Test and reload the config if everything looks ok.

nginx -t
nginx -s reload