Advertisement
Guest User

Untitled

a guest
Nov 26th, 2011
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.17 KB | None | 0 0
  1. user www;
  2. worker_processes 8;
  3.  
  4. pid /var/run/nginx.pid;
  5. error_log /var/log/nginx/error_log;
  6.  
  7. events {
  8. worker_connections 1024;
  9. }
  10.  
  11.  
  12. http {
  13. include /etc/nginx/mime.types;
  14. #include config for virtual hosts
  15. #include /etc/nginx/sites/*;
  16. default_type application/octet-stream;
  17. server_names_hash_max_size 1024;
  18. server_names_hash_bucket_size 1024;
  19. access_log /var/log/nginx/access_log;
  20.  
  21. server {
  22. error_log /var/log/nginx/nginx_global_error;
  23. access_log /var/log/nginx/nginx_global_access;
  24. listen 80;
  25. #server_name _;
  26.  
  27. location / {
  28. proxy_pass http://127.0.0.1:8000;
  29. proxy_redirect off;
  30. proxy_set_header Host $host;
  31. proxy_set_header X-Real-IP $remote_addr;
  32. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  33. client_max_body_size 10m;
  34. client_body_buffer_size 8k;
  35. proxy_connect_timeout 90;
  36. proxy_send_timeout 90;
  37. #proxy_read_timeout 90;
  38. #proxy_buffer_size 4k;
  39. #proxy_busy_buffers_size 64k;
  40. proxy_temp_file_write_size 64k;
  41. }
  42.  
  43. #location ~ .*\.(php|php5)?$
  44. #{
  45. # #fastcgi_pass unix:/tmp/php-cgi.sock;
  46. # fastcgi_pass 127.0.0.1:9000;
  47. # fastcgi_index index.php;
  48. # include fastcgi_params;
  49. #}
  50.  
  51. location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  52. {
  53. expires 24h;
  54. }
  55.  
  56. location ~ .*\.(js|css)?$
  57. {
  58. expires 1h;
  59. }
  60. }
  61.  
  62. #server {
  63. # listen 80;
  64. #
  65. # server_name localhost;
  66. #
  67. # charset utf-8;
  68. #
  69. # location / {
  70. #root /home/lpfan;
  71. #index index.php index.html index.htm;
  72. ######apache backend configuration######
  73. #proxy_pass http://127.0.0.1:8080/; #ip and port for listning apache
  74. #proxy_redirect off;
  75. #proxy_set_header Host $host;
  76. #proxy_set_header X-Real-IP $remote_addr;
  77. #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  78. #client_max_body_size 10m;
  79. #client_body_buffer_size 128k;
  80. #proxy_connect_timeout 90;
  81. #proxy_send_timeout 90;
  82. #proxy_read_timeout 90;
  83. #proxy_buffer_size 4k;
  84. #proxy_buffers 4 32k;
  85. #proxy_busy_buffers_size 64k;
  86. #proxy_temp_file_write_size 10m;
  87.  
  88. # }
  89. #
  90. # error_page 404 /404.html;
  91. #
  92. # location = /404.html {
  93. # root /usr/share/nginx/html;
  94. # }
  95.  
  96. # redirect server error pages to the static page /50x.html
  97. #
  98. # error_page 500 502 503 504 /50x.html;
  99. # location = /50x.html {
  100. # root /usr/share/nginx/html;
  101. # }
  102.  
  103. # location ~ \.php$ {
  104. # root html;
  105. # fastcgi_pass 127.0.0.1:9000;
  106. # fastcgi_index index.php;
  107. # fastcgi_param SCRIPT_FILENAME /home/lpfan$fastcgi_script_name;
  108. # include fastcgi_params;
  109. # }
  110.  
  111.  
  112. #}
  113.  
  114.  
  115. # another virtual host using mix of IP-, name-, and port-based configuration
  116. #
  117. #server {
  118. # listen 8000;
  119. # listen somename:8080;
  120. # server_name somename alias another.alias;
  121.  
  122. # location / {
  123. # root html;
  124. # index index.html index.htm;
  125. # }
  126. #}
  127.  
  128.  
  129. # HTTPS server
  130. #
  131. #server {
  132. # listen 443;
  133. # server_name localhost;
  134.  
  135. # ssl on;
  136. # ssl_certificate cert.pem;
  137. # ssl_certificate_key cert.key;
  138.  
  139. # ssl_session_timeout 5m;
  140.  
  141. # ssl_protocols SSLv2 SSLv3 TLSv1;
  142. # ssl_ciphers HIGH:!aNULL:!MD5;
  143. # ssl_prefer_server_ciphers on;
  144.  
  145. # location / {
  146. # root html;
  147. # index index.html index.htm;
  148. # }
  149. #}
  150.  
  151. }
  152.  
  153.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement