5

Actually whats the difference between the two? My web sites work fine with :

  location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        fastcgi_index index.php;
        include fastcgi.conf;
  }

However i see that some guides on internet also add the snippet to the above code, like:

  location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        fastcgi_index index.php;
        include fastcgi.conf;
        include snippets/fastcgi-php.conf;
}

But i see that the snippet also includes fastcgi.conf inside. So why shall we add include fastcgi.conf?

And what does the snippet do more than fastcgi.conf?

0

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.