Skip to content

Instantly share code, notes, and snippets.

@maulayyacyber
Last active December 12, 2019 01:59
Show Gist options
  • Save maulayyacyber/177004126920c93059ee80554d643d11 to your computer and use it in GitHub Desktop.
Save maulayyacyber/177004126920c93059ee80554d643d11 to your computer and use it in GitHub Desktop.
server {
listen 80;
listen [::]:80;
root /var/www/html;
index index.html index.htm index.php;
server_name _;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment