Guest User

Untitled

a guest
Apr 29th, 2015
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. worker_processes 1;
  2. events {
  3. worker_connections 1024;
  4. }
  5. http {
  6. include mime.types;
  7. default_type application/octet-stream;
  8. sendfile on;
  9. keepalive_timeout 65;
  10. server {
  11. listen 80;
  12. server_name 10.34.58.156;
  13.  
  14. location /media/ {
  15. alias /usr/local/noc/lib/python2.7/site-packages/django/contrib/admin/static/;
  16. gzip on;
  17. gzip_types text/css text/x-js;
  18. }
  19. location /static/ {
  20. alias /usr/local/noc/static/;
  21. gzip on;
  22. gzip_types text/css text/x-js;
  23. }
  24. location ~ ^/(?!(media|static))([^/]+)/([^/]+)/(js|css|img)/(.+)$ {
  25. root /usr/local/noc;
  26. rewrite ^/([^/]+)/([^/]+)/(js|css|img)/(.+)$
  27. /$1/apps/$2/$3/$4 break;
  28. gzip on;
  29. gzip_types text/css text/x-js;
  30. }
  31. location / {
  32. proxy_pass http://127.0.0.1:8000/;
  33. gzip on;
  34. gzip_types text/css text/x-js;
  35. proxy_set_header Host $http_host;
  36. proxy_set_header X-Scheme $scheme;
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment