From e39c3fec7917659c1ec9a04861c38575f4781037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Mart=C3=ADn?= Date: Wed, 22 May 2013 19:00:13 +0200 Subject: [PATCH] Added base nginx configuration. Added 127.0.0.1 to ALLOWED_HOSTS for nginx reverse proxy --- config/production/local_settings.py | 1 + config/production/nginx.conf | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 config/production/nginx.conf diff --git a/config/production/local_settings.py b/config/production/local_settings.py index da02a42..c44914c 100644 --- a/config/production/local_settings.py +++ b/config/production/local_settings.py @@ -20,6 +20,7 @@ ALLOWED_HOSTS = [ 'minecraftcodex.com', 'www.minecraftcodex.com', 'localhost', + '127.0.0.1', ] # Staticfiles diff --git a/config/production/nginx.conf b/config/production/nginx.conf new file mode 100644 index 0000000..8bf93a8 --- /dev/null +++ b/config/production/nginx.conf @@ -0,0 +1,18 @@ +server { + listen 80; + server_name www.minecraftcodex.com minecraftcodex.com; + #access_log logs/domain2.access.log main; + + server_tokens off; + + location /static { + alias /home/app/static/; + expires 30d; + autoindex on; + } + + # pass requests for dynamic content to rails/turbogears/zope, et al + location / { + proxy_pass http://127.0.0.1:8000; + } +}