nginx.EXAMPLE.conf 735 B

12345678910111213141516171819202122232425262728293031
  1. server {
  2. listen 80;
  3. server_name stk-addons.localhost;
  4. root /var/www/stk-addons/;
  5. index index.php;
  6. location ~/api {
  7. root /var/www/stk-addons/api/;
  8. index /index.php;
  9. fastcgi_split_path_info ^(.+\.php)(.*)$;
  10. fastcgi_pass php_default;
  11. include fastcgi_params;
  12. fastcgi_param SCRIPT_FILENAME $document_root/index.php;
  13. }
  14. location ~ .*\.php$ {
  15. try_files $uri $uri/ index.php?q=$uri&$args;
  16. fastcgi_index index.php;
  17. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  18. fastcgi_pass php_default;
  19. include fastcgi_params;
  20. fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
  21. include fastcgi_params;
  22. }
  23. }