Skip to content

Instantly share code, notes, and snippets.

@AlexKMDev
Last active December 17, 2015 08:08
Show Gist options
  • Save AlexKMDev/5577688 to your computer and use it in GitHub Desktop.
Save AlexKMDev/5577688 to your computer and use it in GitHub Desktop.
base nginx configuration for php-fpm
server {
listen 80;
server_name anakros.name;
location / {
root /srv/http/main;
index index.html index.php;
}
location ~ \.(php|html|htm)$ {
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
root /srv/http/main;
include fastcgi.conf;
}
location ~ /\.git {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment