fastcgi_pass_fpm.j2 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. {% if ansible_prolog -%}
  2. {% from 'templates/ansible/prolog.j2' import prolog with context %}
  3. {{ prolog() }}
  4. {% endif -%}
  5. #
  6. # fastcgi configuration for Nginx and PHP-FPM
  7. #
  8. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  9. fastcgi_param PATH_INFO $fastcgi_path_info;
  10. fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  11. fastcgi_param QUERY_STRING $query_string;
  12. fastcgi_param REQUEST_METHOD $request_method;
  13. fastcgi_param CONTENT_TYPE $content_type;
  14. fastcgi_param CONTENT_LENGTH $content_length;
  15. fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  16. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  17. fastcgi_param REQUEST_URI $request_uri;
  18. fastcgi_param DOCUMENT_URI $document_uri;
  19. fastcgi_param DOCUMENT_ROOT $document_root;
  20. fastcgi_param SERVER_PROTOCOL $server_protocol;
  21. fastcgi_param HTTPS $https if_not_empty;
  22. fastcgi_param GATEWAY_INTERFACE CGI/1.1;
  23. fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
  24. fastcgi_param REMOTE_ADDR $remote_addr;
  25. fastcgi_param REMOTE_PORT $remote_port;
  26. fastcgi_param SERVER_ADDR $server_addr;
  27. fastcgi_param SERVER_PORT $server_port;
  28. fastcgi_param SERVER_NAME $server_name;
  29. fastcgi_param REDIRECT_STATUS 200;
  30. fastcgi_pass fpm-backend;
  31. fastcgi_index index.php;
  32. fastcgi_buffer_size 8m;
  33. fastcgi_buffers 8 8m;