app.conf 2.0 KB

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