Advertisement
Guest User

Untitled

a guest
Jun 21st, 2018
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. erver {
  2. charset utf-8;
  3. client_max_body_size 128M;
  4.  
  5. listen 80;
  6.  
  7. server_name %domain% www.%domain%;
  8. root /var/www/%domain%/web;
  9. index index.php;
  10.  
  11. access_log /var/log/nginx/%domain%.access.log;
  12. error_log /var/log/nginx/%domain%.error.log;
  13.  
  14. location / {
  15. # Redirect everything that isn't a real file to index.php
  16. try_files $uri $uri/ /index.php?$args;
  17. }
  18.  
  19. # uncomment to avoid processing of calls to non-existing static files by Yii
  20. #location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
  21. # try_files $uri =404;
  22. #}
  23. #error_page 404 /404.html;
  24.  
  25. location ~ \.php$ {
  26. fastcgi_split_path_info ^(.+?\.php)(/.*)$;
  27. if (!-f $document_root$fastcgi_script_name) {
  28. return 404;
  29. }
  30.  
  31. fastcgi_pass unix:/var/run/php7-fpm.sock;
  32. fastcgi_index index.php;
  33. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  34. fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  35. include fastcgi_params;
  36. fastcgi_read_timeout 600s;
  37. }
  38.  
  39. location ~ /\.(git) {
  40. deny all;
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement