Skip to content

Instantly share code, notes, and snippets.

@jovanialferez
Created June 27, 2017 08:18
Show Gist options
  • Save jovanialferez/1bbfa6ee0e39a6f217ac3936512797e8 to your computer and use it in GitHub Desktop.
Save jovanialferez/1bbfa6ee0e39a6f217ac3936512797e8 to your computer and use it in GitHub Desktop.
klooma-web
server {
listen 80;
root /var/www;
index index.php index.html;
proxy_read_timeout 300;
client_max_body_size 1024M;
location / {
if (-f $request_filename) {
expires off;
break;
}
if (!-e $request_filename) {
rewrite ^/(.+)$ /index.php?kohana_uri=$1 last;
break;
}
}
location ~ /(application|modules|system) {
deny all;
}
location ~ /\. {
deny all;
}
location ~* \.(gif|jpg|png|svg|tiff|pdf|ico)$ {
expires off;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment