Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. root@noc:/usr/local/etc/nginx # cat nginx.conf
  2. events {
  3. worker_connections 1024;
  4. use kqueue;
  5. }
  6.  
  7.  
  8. worker_processes 8;
  9. timer_resolution 100ms;
  10. worker_rlimit_nofile 8192;
  11. worker_priority -5;
  12.  
  13. error_log /var/log/nginx.error_log debug;
  14.  
  15. http {
  16. include mime.types;
  17. default_type application/octet-stream;
  18. sendfile off;
  19. keepalive_timeout 15;
  20. server {
  21. listen 80;
  22. server_name noc;
  23.  
  24. location /media/ {
  25. alias /opt/noc/lib/python2.7/site-packages/django/contrib/admin/static/;
  26. gzip on;
  27. gzip_types text/css text/x-js;
  28. }
  29. location /static/ {
  30. alias /opt/noc/static/;
  31. gzip on;
  32. gzip_types text/css text/x-js;
  33. }
  34. location ~ ^([^/]+)/([^/]+)/(js|css|img)/(.+)$ {
  35. root /opt/noc;
  36. rewrite ^([^/]+)/([^/]+)/(js|css|img)/(.+)$
  37. /$1/apps/$2/$3/$4 break;
  38. gzip on;
  39. gzip_types text/css text/x-js;
  40. }
  41. location / {
  42. proxy_pass http://127.0.0.1:8000/;
  43. gzip on;
  44. gzip_types text/css text/x-js;
  45. }
  46. }
  47. }
  48.  
  49. root@noc:/usr/local/etc/nginx #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement