Skip to content

Instantly share code, notes, and snippets.

@tarnacious
Created February 18, 2013 11:54
Show Gist options
  • Select an option

  • Save tarnacious/4976844 to your computer and use it in GitHub Desktop.

Select an option

Save tarnacious/4976844 to your computer and use it in GitHub Desktop.
Simple nginx config (/etc/nginx/sites-enabled/tarnbarfordnet) for a reverse proxy to a Flask app running on localhost:8000 and to serve the static files directly though nginx.
upstream tarnbarfordnet {
server localhost:8000;
}
server {
root /usr/share/nginx/www;
index index.html index.htm;
server_name localhost;
access_log /var/log/nginx/tarnbarford_net-access.log;
error_log /var/log/nginx/tarnbarford_net-error.log;
location /static {
root /home/ubuntu/author/app/;
}
# the index page
location / {
proxy_pass http://tarnbarfordnet;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment