Skip to content

Instantly share code, notes, and snippets.

@washingtonsoares
Created January 5, 2015 17:52
Show Gist options
  • Select an option

  • Save washingtonsoares/21732167692ae83d2e5e to your computer and use it in GitHub Desktop.

Select an option

Save washingtonsoares/21732167692ae83d2e5e to your computer and use it in GitHub Desktop.
server {
listen 80;
root /home/hihiring/public;
server_name _;
index index.htm index.html;
location / {
try_files $uri/index.html $uri.html $uri @app;
}
location ~* ^.+\.(jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|mp3|flv|mpeg|avi)$ {
try_files $uri @app;
}
location @app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://app_server;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment