Created
August 21, 2019 04:31
-
-
Save quocduongpy/f1e85c910abf074baa544dd0b5959c22 to your computer and use it in GitHub Desktop.
Nginx default PHP FPM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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