Server: Nginx
Configure Nginx to serve your application
Config File
Create .conf file
$ sudo touch /etc/nginx/sites-available/nesula.ifactory.co.confEdit .conf file
$ sudo nano /etc/nginx/sites-available/nesula.ifactory.co.confPaste .conf file contents
server {
listen 80;
listen [::]:80;
server_name nesula.ifactory.co;
root /var/www/nesula.ifactory.co;
index index.html;
location / {
proxy_pass http://localhost:3000; #whatever port your app runs on
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;
}
}Symlink Sites Enabled
Test Nginx config
Restart Nginx
Last updated
