Skip to content

Instantly share code, notes, and snippets.

@shavit shavit/app
Created Jan 11, 2016

Embed
What would you like to do?
Nginx reverse proxy for Go Revel web application. Also redirects from www to non-www. You can also let Nginx handle the static files with another location block.
upstream app {
server 127.0.0.1:3000;
}
server {
listen 80;
server_name www.domain.com;
return 301 http://domain.com;
}
server {
listen 80;
server_name domain.com;
location / {
root /<APP-PATH>;
try_files index.html @app;
}
location @app {
server_tokens off;
proxy_pass http://app;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.