nginx.conf 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. worker_processes 1;
  2. events {
  3. worker_connections 1024;
  4. }
  5. http {
  6. include mime.types;
  7. default_type application/octet-stream;
  8. sendfile on;
  9. keepalive_timeout 65;
  10. server {
  11. listen 80;
  12. charset utf-8;
  13. client_max_body_size 50M;
  14. access_log /var/log/nginx/balticrest_access.log combined;
  15. error_log /var/log/nginx/balticrest_error.log;
  16. root /var/www/balticrest.ru/public;
  17. index index.php;
  18. location / {
  19. try_files $uri $uri/ /index.php?$args;
  20. }
  21. location ~ \.(eot|svg|ttf|woff|txt|jpeg|jpg|gif|png|ico|css|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|tar|wav|bmp|rtf|js|djvu|mht|chm|swf|avi|xml|ogg|mp3)$ {
  22. try_files $uri =404;
  23. }
  24. location ~ \.php$ {
  25. fastcgi_pass php-fpm:9000;
  26. fastcgi_index index.php;
  27. include fastcgi_params;
  28. fastcgi_send_timeout 300;
  29. fastcgi_read_timeout 300;
  30. proxy_send_timeout 300;
  31. proxy_read_timeout 300;
  32. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  33. fastcgi_param PATH_INFO $fastcgi_path_info;
  34. }
  35. }
  36. }