Created
February 18, 2013 11:54
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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