Last active
December 3, 2020 14:10
-
-
Save goeroeku/7fdb95eeb07fc21c0ea3805df601efbf to your computer and use it in GitHub Desktop.
Nginx server block untuk proxy nodejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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