Skip to content

Instantly share code, notes, and snippets.

@quocduongpy
Created August 21, 2019 04:31
Show Gist options
  • Save quocduongpy/f1e85c910abf074baa544dd0b5959c22 to your computer and use it in GitHub Desktop.
Save quocduongpy/f1e85c910abf074baa544dd0b5959c22 to your computer and use it in GitHub Desktop.
Nginx default PHP FPM
server {
listen 80 ;
listen [::]:80 ;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
server_name chovietkieu;
location / {
try_files $uri $uri/ /index.php?$query_string;
#try_files $uri $uri/ =404;
}
location ~ \.php$ {
fastcgi_buffering off;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment