Advertisement
Guest User

amin

a guest
Dec 20th, 2012
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.01 KB | None | 0 0
  1. user nginx;
  2. worker_processes 2;
  3. error_log /var/log/nginx/error.log;
  4. #error_log /var/log/nginx/error.log notice;
  5. #error_log /var/log/nginx/error.log info;
  6. pid /var/run/nginx.pid;
  7. events {
  8. worker_connections 1024;
  9. }
  10. http {
  11. include /etc/nginx/mime.types;
  12. default_type application/octet-stream;
  13. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  14. '$status $body_bytes_sent "$http_referer" '
  15. '"$http_user_agent" "$http_x_forwarded_for"';
  16. access_log /var/log/nginx/access.log main;
  17. sendfile on;
  18. tcp_nopush on;
  19. #keepalive_timeout 0;
  20. keepalive_timeout 75;
  21. tcp_nodelay on;
  22. gzip on;
  23. gzip_http_version 1.0;
  24. gzip_comp_level 2;
  25. gzip_proxied any;
  26. gzip_min_length 1100;
  27. gzip_buffers 16 8k;
  28. gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
  29. # Some version of IE 6 don't handle compression well on some mime-types,
  30. # so just disable for them
  31. gzip_disable "MSIE [1-6].(?!.*SV1)";
  32. # Set a vary header so downstream proxies don't send cached gzipped
  33. # content to IE6
  34. gzip_vary on;
  35. server_names_hash_bucket_size 64;
  36. reset_timedout_connection on;
  37. client_max_body_size 1G;
  38. # proxy settings
  39. proxy_redirect off;
  40. proxy_set_header Host $host;
  41. proxy_set_header X-Real-IP $remote_addr;
  42. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  43. proxy_max_temp_file_size 0;
  44. proxy_connect_timeout 90;
  45. proxy_send_timeout 90;
  46. proxy_read_timeout 90;
  47. proxy_buffer_size 4k;
  48. proxy_buffers 4 32k;
  49. proxy_busy_buffers_size 64k;
  50. proxy_temp_file_write_size 64k;
  51. include /etc/nginx/sites-enabled/*;
  52. #
  53. # The default server
  54. #
  55. server {
  56. listen 80;
  57. server_name _;
  58. #charset koi8-r;
  59. #access_log logs/host.access.log main;
  60. location / {
  61. root /home/username/public_html;
  62. index index.html index.htm index.php;
  63. }
  64. error_page 404 /404.html;
  65. location = /404.html {
  66. root /home/username/public_html;
  67. }
  68. # redirect server error pages to the static page /50x.html
  69. #
  70. error_page 500 502 503 504 /50x.html;
  71. location = /50x.html {
  72. root /home/username/public_html;
  73. }
  74. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  75. #
  76. location ~ \.php$ {
  77. proxy_pass http://127.0.0.1:8080;
  78. index index.php;
  79. }
  80. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  81. #
  82. #location ~ \.php$ {
  83. # root html;
  84. # fastcgi_pass 127.0.0.1:9000;
  85. # fastcgi_index index.php;
  86. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  87. # include fastcgi_params;
  88. #}
  89. # deny access to .htaccess files, if Apache's document root
  90. # concurs with nginx's one
  91. #
  92. #location ~ /\.ht {
  93. # deny all;
  94. #}
  95. }
  96. # Load config files from the /etc/nginx/conf.d directory
  97. include /etc/nginx/conf.d/*.conf;
  98. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement