Skip to content

Instantly share code, notes, and snippets.

@korayguclu
Created November 15, 2013 13:31
Show Gist options
  • Save korayguclu/7484351 to your computer and use it in GitHub Desktop.
Save korayguclu/7484351 to your computer and use it in GitHub Desktop.
nginx configuration for slimframework
server {
listen 80 default ; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
charset utf-8;
#root /usr/share/nginx/www;
#root /var/www/evevgez.com/html;
root /vagrant/html/evevgez-search ;
# Make site accessible from http://localhost/
server_name _;
client_max_body_size 20M;
index index.php;
error_page 404 /404.html;
location / {
try_files $uri $uri/ /index.php?$args;
}
location /images {
# alias /var/www/evevgez.com/images/;
alias /vagrant/images;
error_page 404 /404.png;
}
location = /50x.html {
root /vagrant/html/evevgez-search;
}
location ~ \.php$ {
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
try_files $uri =404;
fastcgi_hide_header X-Powered-By ;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment