New server prep - Ubuntu 20.24 LTS - Nodejs 18
-
# apt-get update # apt-get upgrade # curl -sL https://deb.nodesource.com/setup_20.x -o /tmp/nodesource_setup.sh # sh /tmp/nodesource_setup.sh # apt-get install nodejs
Ref: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-20-04
-
server { listen 80; server_name localhost; root /var/www/html/domain.com/source/static/; index index.html; location / { proxy_pass http://127.0.0.1:3000; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; proxy_read_timeout 600s; } location /static { alias /var/www/html/domain.com/source/static/; index index.html; } }
server { listen 80; server_name static.domain.com; root /var/www/html/static.domain.com/; index index.html; location / { try_files $uri /index.html =404; } }
-
rewrite ^/(.*)$ https://destination.domain.com/$1 permanent;