Skip to content

Instantly share code, notes, and snippets.

@MiquelAdell
Created October 13, 2015 14:47
Show Gist options
  • Save MiquelAdell/0a7725c2b48ae7d9e473 to your computer and use it in GitHub Desktop.
Save MiquelAdell/0a7725c2b48ae7d9e473 to your computer and use it in GitHub Desktop.
daemon off;
worker_processes 1;
events { worker_connections 1024; }
http {
sendfile on;
gzip on;
gzip_http_version 1.0;
gzip_proxied any;
gzip_min_length 500;
gzip_disable "MSIE [1-6]\.";
gzip_types text/plain text/xml text/css
text/comma-separated-values
text/javascript
application/x-javascript
application/atom+xml;
# List of application servers
upstream app_servers {
server 127.0.0.1:8080;
}
# Configuration for the server
server {
# Running port
listen 80;
# Proxying the connections connections
location / {
proxy_pass http://app_servers;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment