Skip to content

Instantly share code, notes, and snippets.

@coxley
Created December 21, 2014 07:51
Show Gist options
  • Save coxley/089b34b8d8e5ecf1170a to your computer and use it in GitHub Desktop.
Save coxley/089b34b8d8e5ecf1170a to your computer and use it in GitHub Desktop.
nginx php-fpm config
server {
listen 80;
root /data/www/nfsen;
index nfsen.php;
server_name nfsen;
error_log /data/www/nfsen/log/error.log error;
access_log /data/www/nfsen/log/access.log main;
location / {
autoindex on;
allow 127.0.0.1;
allow 10.0.0.0/8;
deny all;
}
location ~ .php$ {
try_files $uri = 404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index nfsen.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_read_timeout 300;
}
location ~/\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment