Skip to content

Instantly share code, notes, and snippets.

@faizanayubi
Created October 4, 2016 11:33
Show Gist options
  • Save faizanayubi/44bf8d3c1d8fbc3b11a27309a81ad223 to your computer and use it in GitHub Desktop.
Save faizanayubi/44bf8d3c1d8fbc3b11a27309a81ad223 to your computer and use it in GitHub Desktop.
Nginx Basic Configuration
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
server_name server_domain_or_IP;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
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