Advertisement
kustodian

nginx.conf

Mar 28th, 2012
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. user nobody;
  2. worker_processes 12;
  3. worker_rlimit_nofile 65536;
  4.  
  5. error_log /var/log/nginx/error.log;
  6. pid /var/run/nginx.pid;
  7.  
  8. events
  9. {
  10. worker_connections 10240;
  11. use epoll;
  12. }
  13.  
  14.  
  15. http
  16. {
  17. include mime.types;
  18. default_type application/octet-stream;
  19.  
  20. access_log off;
  21. sendfile on;
  22. keepalive_timeout 30;
  23. tcp_nodelay on;
  24. server_tokens off;
  25.  
  26. gzip on;
  27. gzip_http_version 1.1;
  28. gzip_vary on;
  29. gzip_comp_level 6;
  30. gzip_proxied any;
  31. gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
  32. gzip_buffers 16 8k;
  33.  
  34. upstream backend {
  35. server unix:/dev/shm/.php-fpm/socket;
  36. server unix:/dev/shm/.php-fpm/socket2;
  37. }
  38.  
  39. server
  40. {
  41. listen 80 default;
  42. root /www/php;
  43. error_page 404 = /404.html;
  44.  
  45. location ~* ^.+.(jpg|jpeg|gif|png|css|js|ico|swf|xml|htm|html)$
  46. {
  47. expires 30d;
  48. access_log off;
  49. }
  50.  
  51. location /
  52. {
  53. index index.html index.php;
  54. }
  55.  
  56. location ~ \.php$
  57. {
  58. include fastcgi_params;
  59. fastcgi_pass backend;
  60. fastcgi_index index.php;
  61. fastcgi_send_timeout 30;
  62. fastcgi_read_timeout 30;
  63. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  64. }
  65.  
  66. location ~ /\.ht
  67. {
  68. deny all;
  69. }
  70. }
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement