Skip to content

Instantly share code, notes, and snippets.

@wesdeveloper
Created January 6, 2019 00:36
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 wesdeveloper/714ed4712d8263b9b1ce77afc8a9002b to your computer and use it in GitHub Desktop.
Save wesdeveloper/714ed4712d8263b9b1ce77afc8a9002b to your computer and use it in GitHub Desktop.
// Nginx.config
worker_processes 4;
events { worker_connections 1024; }
http {
upstream web {
least_conn;
server web:3000 max_fails=3 fail_timeout=30s;
}
server {
listen 80;
server_name web.com ns1.locaweb.com.br;
location / {
proxy_pass http://web;
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;
}
}
}
// Dockerfile nginx
# Set nginx base image
FROM nginx
# Copy custom configuration file from the current directory
COPY nginx.conf /etc/nginx/nginx.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment