default.txt 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. user www www;
  2. worker_processes 2;
  3. pid /var/run/nginx.pid;
  4. error_log /var/log/nginx.error_log debug | info | notice | warn | error | crit;
  5. events {
  6. connections 2000;
  7. use kqueue | rtsig | epoll | /dev/poll | select | poll;
  8. }
  9. http {
  10. log_format main '$remote_addr - $remote_user [$time_local] '
  11. '"$request" $status $bytes_sent '
  12. '"$http_referer" "$http_user_agent" '
  13. '"$gzip_ratio"';
  14. send_timeout 3m;
  15. client_header_buffer_size 1k;
  16. gzip on;
  17. gzip_min_length 1100;
  18. #lingering_time 30;
  19. server {
  20. server_name one.example.com www.one.example.com;
  21. access_log /var/log/nginx.access_log main;
  22. rewrite (.*) /index.php?page=$1 break;
  23. location / {
  24. proxy_pass http://127.0.0.1/;
  25. proxy_redirect off;
  26. proxy_set_header Host $host;
  27. proxy_set_header X-Real-IP $remote_addr;
  28. charset koi8-r;
  29. }
  30. location /api/ {
  31. fastcgi_pass 127.0.0.1:9000;
  32. }
  33. location ~* \.(jpg|jpeg|gif)$ {
  34. root /spool/www;
  35. }
  36. }
  37. }