Skip to content

Instantly share code, notes, and snippets.

@chege-kimaru
Last active July 18, 2020 15:26
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 chege-kimaru/86e737c85e6d810d952232bd3c221170 to your computer and use it in GitHub Desktop.
Save chege-kimaru/86e737c85e6d810d952232bd3c221170 to your computer and use it in GitHub Desktop.
Reverse Proxy for Nginx
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