server {
  listen       80;
  server_name  www.minecraftcodex.com minecraftcodex.com;
  access_log    /home/app/logs/nginx.access.log;
  error_log     /home/app/logs/nginx.error.log;

  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;
    proxy_redirect     off;
    proxy_set_header   Host              $host;
    proxy_set_header   X-Real-IP         $remote_addr;
    proxy_set_header   X-Forwarded-For   $proxy_add_x_forwarded_for;
    proxy_set_header   X-Forwarded-Proto $scheme;
  }
}
