default.conf 710 B

12345678910111213141516171819202122232425262728293031323334
  1. upstream php-upstream {
  2. server unix:/var/run/php/php5-fpm.sock;
  3. }
  4. server {
  5. listen 80;
  6. root /var/www/app;
  7. index index.php index.html index.htm;
  8. server_name milkyway.guern.eu;
  9. sendfile off;
  10. # add locations for static files to not forward these requests to PHP
  11. location ~* \.(css|js) {
  12. alias /var/www/app/admin/dist;
  13. try_files $uri uri/ =404;
  14. }
  15. location /api {
  16. include fastcgi_params;
  17. fastcgi_param SCRIPT_FILENAME /var/www/app/api/index.php;
  18. fastcgi_pass php-upstream;
  19. }
  20. location /admin {
  21. include fastcgi_params;
  22. fastcgi_param SCRIPT_FILENAME /var/www/app/index.php;
  23. fastcgi_pass php-upstream;
  24. }
  25. location / {
  26. try_files $uri =404;
  27. }
  28. }