Skip to content

Instantly share code, notes, and snippets.

@goeroeku
Last active December 3, 2020 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goeroeku/7fdb95eeb07fc21c0ea3805df601efbf to your computer and use it in GitHub Desktop.
Save goeroeku/7fdb95eeb07fc21c0ea3805df601efbf to your computer and use it in GitHub Desktop.
Nginx server block untuk proxy nodejs
server {
server_name nodejs.idch.my.id;
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;
}
}
<html>
<head><title>IDCH ReactJS & NodeJS</title></head>
<body>
<p>Tutorial deploy React JS and Node.js apps</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment