Skip to content

Instantly share code, notes, and snippets.

@huglester
Created March 17, 2014 23:47
Show Gist options
  • Save huglester/9610793 to your computer and use it in GitHub Desktop.
Save huglester/9610793 to your computer and use it in GitHub Desktop.
nginx.conf php_value
server {
listen 0.0.0.0;
root /var/www;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$args;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~* \\.(js|css|png|jpg|jpeg|gif|ico)$ {
expires 2w;
}
location ~* \\.php$ {
fastcgi_index index.php;
fastcgi_pass unix:/var/run/php-fpm.sock;
include /etc/nginx/fastcgi_params;
fastcgi_param PHP_VALUE "
display_errors=On
display_startup_errors=On
error_reporting=30719
";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment