Skip to content

Instantly share code, notes, and snippets.

@wokamoto
Last active August 29, 2015 13:57
Show Gist options
  • Save wokamoto/9661656 to your computer and use it in GitHub Desktop.
Save wokamoto/9661656 to your computer and use it in GitHub Desktop.
[Nginx] fc2blog 用
upstream phpfpm {
server localhost:9000;
}
server {
listen 80;
server_name _;
root /var/www/html;
index index.php index.html index.htm;
access_log /var/log/nginx/access.log main;
#location ~* install\.php {
# return 404;
#}
location / {
try_files $uri $uri/ /index.php?$args;
}
location /admin {
try_files $uri $uri/ /admin/index.php?$args;
}
# Pass all .php files onto a php-fpm/php-fcgi server.
location ~ \.php$ {
try_files $uri =404;
expires off;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass phpfpm;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_intercept_errors on;
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;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment