Advertisement
ddserver

Untitled

May 26th, 2016
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. server {
  2. server_name site.info www.site.info;
  3. charset off;
  4. disable_symlinks if_not_owner from=$root_path;
  5. index index.html index.php;
  6. root $root_path;
  7. set $root_path /var/www/server/data/www/site.info;
  8. error_log /var/www/httpd-logs/site.info.error.log notice;
  9. include /etc/nginx/vhosts-includes/*.conf;
  10.  
  11. client_max_body_size 1g;
  12. client_body_buffer_size 128k;
  13.  
  14. location / {
  15. try_files $uri $uri/ /index.php?$args;
  16. rewrite ^([^.\?]*[^/])$ $1/ permanent;
  17. location ~ [^/]\.ph(p\d*|tml)$ {
  18. try_files /does_not_exists @php;
  19. }
  20. }
  21.  
  22. location ~ \.php$ {
  23.  
  24. fastcgi_buffers 4 256k;
  25. fastcgi_busy_buffers_size 256k;
  26. fastcgi_temp_file_write_size 256k;
  27.  
  28. fastcgi_index index.php;
  29. fastcgi_pass unix:/var/www/php-fpm/server.sock;
  30. include fastcgi_params;
  31. fastcgi_param SCRIPT_FILENAME $root_path/index.php;
  32. location ~ [^/]\.ph(p\d*|tml)$ {
  33. try_files /does_not_exists @php;
  34. }
  35. }
  36. location ~ /\. {
  37. access_log off;
  38. log_not_found off;
  39. location ~ [^/]\.ph(p\d*|tml)$ {
  40. try_files /does_not_exists @php;
  41. }
  42. }
  43. location @php {
  44. fastcgi_index index.php;
  45. fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@site.info";
  46. fastcgi_pass unix:/var/www/php-fpm/server.sock;
  47. fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
  48. try_files $uri =404;
  49. include fastcgi_params;
  50. }
  51. ssi on;
  52. gzip on;
  53. gzip_comp_level 5;
  54. gzip_disable "msie6";
  55. gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
  56. access_log off ;
  57. listen IP:80;
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement