app.conf 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. server {
  2. charset utf-8;
  3. client_max_body_size 128M;
  4. sendfile off;
  5. listen 80; ## listen for ipv4
  6. #listen [::]:80 default_server ipv6only=on; ## listen for ipv6
  7. server_name y2aa-frontend.dev;
  8. root /app/frontend/web/;
  9. index index.php;
  10. access_log /app/vagrant/nginx/log/frontend-access.log;
  11. error_log /app/vagrant/nginx/log/frontend-error.log;
  12. location / {
  13. # Redirect everything that isn't a real file to index.php
  14. try_files $uri $uri/ /index.php$is_args$args;
  15. }
  16. # uncomment to avoid processing of calls to non-existing static files by Yii
  17. #location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
  18. # try_files $uri =404;
  19. #}
  20. #error_page 404 /404.html;
  21. location ~ \.php$ {
  22. include fastcgi_params;
  23. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  24. #fastcgi_pass 127.0.0.1:9000;
  25. fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
  26. try_files $uri =404;
  27. }
  28. location ~ /\.(ht|svn|git) {
  29. deny all;
  30. }
  31. }
  32. server {
  33. charset utf-8;
  34. client_max_body_size 128M;
  35. sendfile off;
  36. listen 80; ## listen for ipv4
  37. #listen [::]:80 default_server ipv6only=on; ## listen for ipv6
  38. server_name y2aa-backend.dev;
  39. root /app/backend/web/;
  40. index index.php;
  41. access_log /app/vagrant/nginx/log/backend-access.log;
  42. error_log /app/vagrant/nginx/log/backend-error.log;
  43. location / {
  44. # Redirect everything that isn't a real file to index.php
  45. try_files $uri $uri/ /index.php$is_args$args;
  46. }
  47. # uncomment to avoid processing of calls to non-existing static files by Yii
  48. #location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
  49. # try_files $uri =404;
  50. #}
  51. #error_page 404 /404.html;
  52. location ~ \.php$ {
  53. include fastcgi_params;
  54. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  55. #fastcgi_pass 127.0.0.1:9000;
  56. fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
  57. try_files $uri =404;
  58. }
  59. location ~ /\.(ht|svn|git) {
  60. deny all;
  61. }
  62. }