Guest User

Untitled

a guest
Sep 18th, 2012
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.94 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/media/;
  79. gzip on;
  80. gzip_types text/css text/x-js;
  81. }
  82.  
  83. location ~ ^/static/ {
  84. root /opt/noc;
  85. gzip on;
  86. gzip_types text/css text/x-js;
  87. }
  88.  
  89. location ~ ^/([^/]+)/([^/]+)/(js|css|img)/(.+)$ {
  90. root /opt/noc;
  91. rewrite ^/([^/]+)/([^/]+)/(js|css|img)/(.+)$
  92. /$1/apps/$2/$3/$4 break;
  93. gzip on;
  94. gzip_types text/css text/x-js;
  95. }
  96.  
  97. location / {
  98. proxy_pass http://127.0.0.1:8000/;
  99. #root /usr/share/nginx/html;
  100. #index index.html index.htm;
  101. }
  102.  
  103. error_page 404 /404.html;
  104. location = /404.html {
  105. root /usr/share/nginx/html;
  106. }
  107.  
  108. # redirect server error pages to the static page /50x.html
  109. #
  110. error_page 500 502 503 504 /50x.html;
  111. location = /50x.html {
  112. root /usr/share/nginx/html;
  113. }
  114.  
  115. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  116. #
  117. #location ~ \.php$ {
  118. # proxy_pass http://127.0.0.1;
  119. #}
  120.  
  121. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  122. #
  123. #location ~ \.php$ {
  124. # root html;
  125. # fastcgi_pass 127.0.0.1:9000;
  126. # fastcgi_index index.php;
  127. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  128. # include fastcgi_params;
  129. #}
  130.  
  131. # deny access to .htaccess files, if Apache's document root
  132. # concurs with nginx's one
  133. #
  134. #location ~ /\.ht {
  135. # deny all;
  136. #}
  137. }
  138.  
  139. # Load config files from the /etc/nginx/conf.d directory
  140. include /etc/nginx/conf.d/*.conf;
  141.  
  142. }
Advertisement
Add Comment
Please, Sign In to add comment