Guest User

Untitled

a guest
Sep 5th, 2011
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.13 KB | None | 0 0
  1. # Aegir web server main configuration file
  2.  
  3. #######################################################
  4. ### nginx.conf main
  5. #######################################################
  6.  
  7. ## FastCGI params
  8. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  9. fastcgi_param QUERY_STRING $query_string;
  10. fastcgi_param REQUEST_METHOD $request_method;
  11. fastcgi_param CONTENT_TYPE $content_type;
  12. fastcgi_param CONTENT_LENGTH $content_length;
  13. fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  14. fastcgi_param REQUEST_URI $request_uri;
  15. fastcgi_param DOCUMENT_URI $document_uri;
  16. fastcgi_param DOCUMENT_ROOT $document_root;
  17. fastcgi_param SERVER_PROTOCOL $server_protocol;
  18. fastcgi_param GATEWAY_INTERFACE CGI/1.1;
  19. fastcgi_param SERVER_SOFTWARE ApacheSolaris/$nginx_version;
  20. fastcgi_param REMOTE_ADDR $remote_addr;
  21. fastcgi_param REMOTE_PORT $remote_port;
  22. fastcgi_param SERVER_ADDR $server_addr;
  23. fastcgi_param SERVER_PORT $server_port;
  24. fastcgi_param SERVER_NAME $server_name;
  25. fastcgi_param REDIRECT_STATUS 200;
  26. fastcgi_index index.php;
  27.  
  28. ## Default index files
  29. index index.php index.html;
  30.  
  31. ## Size Limits
  32. client_body_buffer_size 64k;
  33. client_header_buffer_size 32k;
  34. client_max_body_size 100m;
  35. large_client_header_buffers 32 32k;
  36. connection_pool_size 256;
  37. request_pool_size 4k;
  38. server_names_hash_bucket_size 512;
  39. server_names_hash_max_size 8192;
  40. types_hash_max_size 8192;
  41. types_hash_bucket_size 512;
  42. fastcgi_buffer_size 128k;
  43. fastcgi_buffers 256 4k;
  44. fastcgi_busy_buffers_size 256k;
  45. fastcgi_temp_file_write_size 256k;
  46.  
  47. ## Timeouts
  48. client_body_timeout 60;
  49. client_header_timeout 60;
  50. send_timeout 60;
  51. lingering_time 30;
  52. lingering_timeout 5;
  53. fastcgi_connect_timeout 60;
  54. fastcgi_send_timeout 300;
  55. fastcgi_read_timeout 300;
  56.  
  57. ## Open File Performance
  58. open_file_cache max=8000 inactive=30s;
  59. open_file_cache_valid 60s;
  60. open_file_cache_min_uses 3;
  61. open_file_cache_errors on;
  62.  
  63. ## FastCGI Caching
  64. fastcgi_cache_path /var/lib/nginx/speed
  65. levels=2:2:2
  66. keys_zone=speed:50m
  67. inactive=1h
  68. max_size=1g;
  69.  
  70. ## General Options
  71. ignore_invalid_headers on;
  72. limit_zone gulag $binary_remote_addr 10m;
  73. recursive_error_pages on;
  74. reset_timedout_connection on;
  75. fastcgi_intercept_errors on;
  76.  
  77. ## TCP options
  78. tcp_nopush on;
  79.  
  80. ## SSL performance
  81. ssl_session_cache shared:SSL:10m;
  82. ssl_session_timeout 10m;
  83.  
  84. ## Compression
  85. gzip_buffers 16 8k;
  86. gzip_comp_level 5;
  87. gzip_http_version 1.1;
  88. gzip_min_length 10;
  89. gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
  90. gzip_vary on;
  91. gzip_proxied any;
  92. gzip_disable "MSIE [1-6]\.";
  93.  
  94. ## Log Format
  95. log_format main '"$remote_addr" $host [$time_local] '
  96. '"$request" $status $body_bytes_sent '
  97. '$request_length $bytes_sent "$http_referer" '
  98. '"$http_user_agent" $request_time "$gzip_ratio"';
  99.  
  100. client_body_temp_path /var/lib/nginx/body 1 2;
  101. access_log /var/log/nginx/access.log main;
  102. error_log /var/log/nginx/error.log crit;
  103.  
  104. # Extra configuration from modules:
  105. #######################################################
  106. ### nginx default server
  107. #######################################################
  108.  
  109. server {
  110. limit_conn gulag 10; # like mod_evasive - this allows max 10 simultaneous connections from one IP address
  111. listen 209.147.126.116:80;
  112. server_name _;
  113. location / {
  114. root /var/www/nginx-default;
  115. index index.html index.htm;
  116. }
  117. }
  118.  
  119. #######################################################
  120. ### nginx virtual domains
  121. #######################################################
  122.  
  123. # virtual hosts
  124. include /var/aegir/config/server_master/nginx/pre.d/*;
  125. include /var/aegir/config/server_master/nginx/platform.d/*;
  126. include /var/aegir/config/server_master/nginx/vhost.d/*;
  127. include /var/aegir/config/server_master/nginx/post.d/*;
  128.  
  129. #######################################################
  130. ### nginx default ssl server
  131. #######################################################
  132.  
  133. server {
  134. limit_conn gulag 10; # like mod_evasive - this allows max 10 simultaneous connections from one IP address
  135. listen 209.147.126.116:443;
  136. listen 209.147.126.2:443;
  137. listen 209.147.126.3:443;
  138. listen 209.147.126.4:443;
  139. listen 209.147.126.5:443;
  140. listen 209.147.126.6:443;
  141. listen 209.147.126.7:443;
  142. listen 209.147.126.8:443;
  143. listen 209.147.126.9:443;
  144. listen 209.147.126.10:443;
  145. server_name _;
  146. location / {
  147. root /var/www/nginx-default;
  148. index index.html index.htm;
  149. }
  150. }
Advertisement
Add Comment
Please, Sign In to add comment