server
{
server_name habrahabr.ru;
access_log /home/webmaster/habrahabr.ru/logs/access.log;
error_log /home/webmaster/habrahabr.ru/logs/error.log;
root /home/webmaster/habrahabr.ru/public_html;
charset utf-8;
location /
{
#gzip_static on;
index index.html index.htm index.php;
#try_files $uri $uri/ /index.php?route=$uri&$args;
}
location ~ \.php$
{
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/tmp/web_sockets/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param DOCUMENT_ROOT /home/webmaster/habrahabr.ru/public_html;
fastcgi_param SCRIPT_FILENAME /home/webmaster/habrahabr.ru/public_html$fastcgi_script_name;
fastcgi_param PATH_TRANSLATED /home/webmaster/habrahabr.ru/public_html$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
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;
}
location = /favicon.ico
{
log_not_found off;
access_log off;
}
location = /robots.txt
{
allow all;
log_not_found off;
access_log off;
}
location ~* \.(jpg|jpeg|gif|png)$
{
access_log off;
expires 30d;
}
location ~ /\.ht
{
deny all;
}
}