2
0

nginx.conf.j2 767 B

123456789101112131415161718192021222324252627282930313233
  1. server {
  2. listen 80;
  3. gzip on;
  4. server_name {{ inventory_hostname }};
  5. root {{ app_www_deploy_target }};
  6. client_max_body_size 16M;
  7. access_log off;
  8. error_log /var/log/nginx/{{ inventory_hostname }}.error.log warn;
  9. location / {
  10. index index.html index.php;
  11. }
  12. location ~ /.git/ {
  13. deny all;
  14. }
  15. location ~ \.php$ {
  16. try_files $fastcgi_script_name =404;
  17. include fastcgi_params;
  18. fastcgi_pass unix:/run/php/php{{ app_php_version }}-fpm.sock;
  19. fastcgi_index index.php;
  20. fastcgi_buffers 8 16k;
  21. fastcgi_buffer_size 32k;
  22. fastcgi_param DOCUMENT_ROOT $realpath_root;
  23. fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
  24. }
  25. }