Skip to content

Instantly share code, notes, and snippets.

@adam12
Created October 13, 2012 00:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adam12/3882464 to your computer and use it in GitHub Desktop.
Save adam12/3882464 to your computer and use it in GitHub Desktop.
nginx+php-fpm+ci
location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {
expires max;
log_not_found off;
}
location / {
try_files $uri $uri/ /index.php;
}
location ~* \.php$ {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
}
server {
listen 80;
server_name domain.com www.domain.com;
index index.php index.html index.htm;
root /home/deployer/domain.com/public_html;
access_log /home/deployer/domain.com/logs/access.log;
include /etc/nginx/includes/codeigniter.conf;
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment