Advertisement
lanceq

Untitled

Apr 17th, 2014
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.66 KB | None | 0 0
  1. user www-data;
  2. worker_processes 6;
  3.  
  4. #error_log logs/error.log;
  5. #error_log logs/error.log notice;
  6. #error_log logs/error.log info;
  7.  
  8. #pid logs/nginx.pid;
  9.  
  10.  
  11. events {
  12. worker_connections 1024;
  13. multi_accept on;
  14. }
  15.  
  16.  
  17. http {
  18. include mime.types;
  19. default_type application/octet-stream;
  20.  
  21. #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  22. # '$status $body_bytes_sent "$http_referer" '
  23. # '"$http_user_agent" "$http_x_forwarded_for"';
  24.  
  25. #access_log logs/access.log main;
  26.  
  27. sendfile on;
  28. tcp_nopush on;
  29. tcp_nodelay on;
  30.  
  31. #keepalive_timeout 0;
  32. keepalive_timeout 2;
  33.  
  34. # Gzip Settings
  35.  
  36. gzip on;
  37. gzip_static on;
  38. gzip_disable "msie6";
  39. gzip_http_version 1.1;
  40. gzip_comp_level 6;
  41. gzip_proxied any;
  42. gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript text/x-js;
  43. gzip_buffers 16 8k;
  44.  
  45. # File Cache Settings
  46.  
  47. open_file_cache max=5000 inactive=20s;
  48. open_file_cache_valid 30s;
  49. open_file_cache_min_uses 2;
  50. open_file_cache_errors on;
  51.  
  52.  
  53.  
  54. server {
  55. listen 80;
  56. server_name localhost;
  57.  
  58. #charset koi8-r;
  59.  
  60. #access_log logs/host.access.log main;
  61.  
  62. location / {
  63. root html;
  64. index index.html index.htm;
  65. }
  66.  
  67. location ~* \.(jpg|jpeg|png|gif|ico)$ {
  68. log_not_found off;
  69. access_log off;
  70. }
  71.  
  72. #error_page 404 /404.html;
  73.  
  74. # redirect server error pages to the static page /50x.html
  75. #
  76. error_page 500 502 503 504 /50x.html;
  77. location = /50x.html {
  78. root html;
  79. }
  80.  
  81. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  82. #
  83. #location ~ \.php$ {
  84. # proxy_pass http://127.0.0.1;
  85. #}
  86.  
  87. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  88. #
  89. #location ~ \.php$ {
  90. # root html;
  91. # fastcgi_pass 127.0.0.1:9000;
  92. # fastcgi_index index.php;
  93. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  94. # include fastcgi_params;
  95. #}
  96.  
  97. # deny access to .htaccess files, if Apache's document root
  98. # concurs with nginx's one
  99. #
  100. #location ~ /\.ht {
  101. # deny all;
  102. #}
  103. }
  104.  
  105.  
  106. # another virtual host using mix of IP-, name-, and port-based configuration
  107. #
  108. #server {
  109. # listen 8000;
  110. # listen somename:8080;
  111. # server_name somename alias another.alias;
  112.  
  113. # location / {
  114. # root html;
  115. # index index.html index.htm;
  116. # }
  117. #}
  118.  
  119.  
  120. # HTTPS server
  121. #
  122. #server {
  123. # listen 443;
  124. # server_name localhost;
  125.  
  126. # ssl on;
  127. # ssl_certificate cert.pem;
  128. # ssl_certificate_key cert.key;
  129.  
  130. # ssl_session_timeout 5m;
  131.  
  132. # ssl_protocols SSLv2 SSLv3 TLSv1;
  133. # ssl_ciphers HIGH:!aNULL:!MD5;
  134. # ssl_prefer_server_ciphers on;
  135.  
  136. # location / {
  137. # root html;
  138. # index index.html index.htm;
  139. # }
  140. #}
  141. include /etc/nginx/sites-enabled/*;
  142.  
  143. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement