Node JS server in aws-ec2

server {server_name posapi.sathifood.com;location / {proxy_pass http://localhost:3000;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;proxy_redirect off;}}server {if ($host = posapi.sathifood.com) {return 301 https://$host$request_uri;} # managed by Certbotlisten 80;server_name posapi.sathifood.com;
return 404; # managed by Certbot
}
nginx: the configuration file /etc/nginx/nginx.conf syntax is oknginx: configuration file /etc/nginx/nginx.conf test is successful

--

--

--

Software Engineer, Full-Stack developer , Mobile Application Engineer. Running own startup "Software Factory".

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Create a react native library and publish to GitHub packages

React Component life cycle

Handle errors like a rockstar in React 16+

How to create an Express app in minutes?

Complete NodeJS course with express, socket io and MongoDB

Tutorial ESP32 Door Lock 3in1 Fingerprint Keypad 4x3 and RFID PN532

Tutorial ESP32 Door Lock 3in1 Fingerprint Keypad 4x3 and RFID PN532

BlogPost_303

Commonly-Used JavaScript Array Methods

10 Best React Libraries and Frameworks to Look Out for in 2021

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Redmen Ishab

Redmen Ishab

Software Engineer, Full-Stack developer , Mobile Application Engineer. Running own startup "Software Factory".

More from Medium

Configuring an HTTPS Server with Nginx and Certbot

Locked door

Detecting Tethering using TCP TTL, Python, Php, MariaDB on AWS.

How to manage and use Nginx Virtual host in Ubuntu

Containerise Nodejs with Docker