Skip to content

Instantly share code, notes, and snippets.

@brianmcdo
Created March 24, 2017 00:49
Show Gist options
  • Save brianmcdo/8d68c443f8040e2d79e57c8f2c0b119c to your computer and use it in GitHub Desktop.
Save brianmcdo/8d68c443f8040e2d79e57c8f2c0b119c to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name youdomainname.com www.yourdomainname.com;
root /path/to/your/web/directory;
charset utf-8;
index index.php index.html;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# Hide Hidden Folder
location ~ /\. { return 403; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment