Guest User

Untitled

a guest
Sep 18th, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 KB | None | 0 0
  1. [root@noc nginx]# cat nginx.conf
  2. #######################################################################
  3. #
  4. # This is the main Nginx configuration file.
  5. #
  6. # More information about the configuration options is available on
  7. # * the English wiki - http://wiki.nginx.org/Main
  8. # * the Russian documentation - http://sysoev.ru/nginx/
  9. #
  10. #######################################################################
  11.  
  12. #----------------------------------------------------------------------
  13. # Main Module - directives that cover basic functionality
  14. #
  15. # http://wiki.nginx.org/NginxHttpMainModule
  16. #
  17. #----------------------------------------------------------------------
  18.  
  19. user nginx;
  20. worker_processes 1;
  21.  
  22. error_log /var/log/nginx/error.log;
  23. #error_log /var/log/nginx/error.log notice;
  24. #error_log /var/log/nginx/error.log info;
  25.  
  26. pid /var/run/nginx.pid;
  27.  
  28.  
  29. #----------------------------------------------------------------------
  30. # Events Module
  31. #
  32. # http://wiki.nginx.org/NginxHttpEventsModule
  33. #
  34. #----------------------------------------------------------------------
  35.  
  36. events {
  37. worker_connections 1024;
  38. }
  39.  
  40.  
  41. #----------------------------------------------------------------------
  42. # HTTP Core Module
  43. #
  44. # http://wiki.nginx.org/NginxHttpCoreModule
  45. #
  46. #----------------------------------------------------------------------
  47.  
  48. http {
  49. include /etc/nginx/mime.types;
  50. default_type application/octet-stream;
  51.  
  52. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  53. '$status $body_bytes_sent "$http_referer" '
  54. '"$http_user_agent" "$http_x_forwarded_for"';
  55.  
  56. access_log /var/log/nginx/access.log main;
  57.  
  58. sendfile on;
  59. #tcp_nopush on;
  60.  
  61. #keepalive_timeout 0;
  62. keepalive_timeout 65;
  63.  
  64. #gzip on;
  65.  
  66. #
  67. # The default server
  68. #
  69. server {
  70. listen 80;
  71. server_name noc.gnc.am;
  72.  
  73. #charset koi8-r;
  74.  
  75. #access_log logs/host.access.log main;
  76.  
  77. location /media/ {
  78. alias /opt/noc/contrib/lib/django/contrib/admin/static/;
  79. gzip on;
  80. gzip_types text/css text/x-js;
  81. }
  82. location ~ ^/static/ {
  83. root /opt/noc;
  84. gzip on;
  85. gzip_types text/css text/x-js;
  86. }
  87. location ~ ^([^/]+)/([^/]+)/(js|css|img)/(.+)$ {
  88. root /opt/noc;
  89. rewrite ^([^/]+)/([^/]+)/(js|css|img)/(.+)$
  90. /$1/apps/$2/$3/$4 break;
  91. gzip on;
  92. gzip_types text/css text/x-js;
  93. }
  94. location / {
  95. proxy_pass http://127.0.0.1:8000/;
  96. gzip on;
  97. gzip_types text/css text/x-js;
  98. }
  99.  
  100. error_page 404 /404.html;
  101. location = /404.html {
  102. root /usr/share/nginx/html;
  103. }
  104.  
  105. # redirect server error pages to the static page /50x.html
  106. #
  107. error_page 500 502 503 504 /50x.html;
  108. location = /50x.html {
  109. root /usr/share/nginx/html;
  110. }
  111.  
  112. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  113. #
  114. #location ~ \.php$ {
  115. # proxy_pass http://127.0.0.1;
  116. #}
  117.  
  118. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  119. #
  120. #location ~ \.php$ {
  121. # root html;
  122. # fastcgi_pass 127.0.0.1:9000;
  123. # fastcgi_index index.php;
  124. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  125. # include fastcgi_params;
  126. #}
  127.  
  128. # deny access to .htaccess files, if Apache's document root
  129. # concurs with nginx's one
  130. #
  131. #location ~ /\.ht {
  132. # deny all;
  133. #}
  134. }
  135.  
  136. # Load config files from the /etc/nginx/conf.d directory
  137. include /etc/nginx/conf.d/*.conf;
  138.  
  139. }
  140. [root@noc nginx]#
Advertisement
Add Comment
Please, Sign In to add comment