Skip to content

Instantly share code, notes, and snippets.

@ELLIOTTCABLE
Created November 18, 2009 00:28
Show Gist options
  • Select an option

  • Save ELLIOTTCABLE/237425 to your computer and use it in GitHub Desktop.

Select an option

Save ELLIOTTCABLE/237425 to your computer and use it in GitHub Desktop.
upstream taupe {
server 127.0.0.1:21020;
}
server { # tau.pe
server_name .tau.pe;
include includes.conf;
root /srv/http/sites/tau.pe;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_max_temp_file_size 0;
# If the file exists as a static file, serve it directly, and break out.
try_files $uri $uri/ @proxy;
}
location @proxy {
# Else, we know it's dynamic, let the app deal with it
proxy_pass http://taupe;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment