Skip to content

Instantly share code, notes, and snippets.

@sanikkenway
Created April 27, 2021 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sanikkenway/f8962dc20f4a97ef4640a793cfad782d to your computer and use it in GitHub Desktop.
Save sanikkenway/f8962dc20f4a97ef4640a793cfad782d to your computer and use it in GitHub Desktop.
Nginx Server Block With PHP-FPM
server {
listen 80;
root /var/www/html;
index index.php;
server_name example.com;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment