Skip to content

Instantly share code, notes, and snippets.

@neaf
Created April 18, 2012 18:39
Show Gist options
  • Save neaf/2415683 to your computer and use it in GitHub Desktop.
Save neaf/2415683 to your computer and use it in GitHub Desktop.
Port redirect with nginx
# Nginx config for redirecting traffic from port 80 to 8800
upstream app {
server localhost:8800 fail_timeout=60;
}
server {
listen 80;
client_max_body_size 100m;
server_name app.example.com;
keepalive_timeout 65;
location / {
proxy_pass http://app;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment