Skip to content

Instantly share code, notes, and snippets.

@gegeriyadi
Last active December 21, 2018 03:52
Show Gist options
  • Save gegeriyadi/6d1319bb5be59c3e70275214a3cfcff9 to your computer and use it in GitHub Desktop.
Save gegeriyadi/6d1319bb5be59c3e70275214a3cfcff9 to your computer and use it in GitHub Desktop.
server {
listen 80;
listen [::]:80;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
# With php7.0-fpm:
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment