nginx.conf 676 B

123456789101112131415161718192021222324252627282930
  1. upstream django-beta {
  2. server 127.0.0.1:8000;
  3. }
  4. server {
  5. server_name karmanotes.org ;
  6. client_max_body_size 20M;
  7. location /library/ {
  8. alias /var/www/djkarma/;
  9. }
  10. location /static/ {
  11. alias /var/www/static/;
  12. }
  13. location / {
  14. proxy_pass http://django-beta;
  15. proxy_redirect off;
  16. proxy_set_header Host $host;
  17. proxy_set_header X-Real-IP $remote_addr;
  18. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  19. }
  20. }
  21. server {
  22. server_name karmanotes.com www.karmanotes.com;
  23. rewrite ^ http://karmanotes.org$request_uri? permanent;
  24. }