Last active
July 18, 2020 15:26
-
-
Save chege-kimaru/86e737c85e6d810d952232bd3c221170 to your computer and use it in GitHub Desktop.
Reverse Proxy for Nginx
This file contains hidden or 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 example.com; | |
root /var/www/html/example.com/html; | |
index index.html index.htm; | |
client_max_body_size 10G; | |
location / { | |
proxy_pass http://localhost:4000; | |
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; | |
} | |
} | |
#sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/ | |
#start APP | |
#NODE_ENV=production pm2 start app.js --name eventa | |
#PORT=4001 pm2 start app.js --name eventa | |
#pm2 start npm --name "my-app-name" -- run "npm:script" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment