server { listen 80; root /var/www/html/blog; index index.html index.htm; server_name blog.mydomain.ru; access_log /var/log/nginx/access.blog.mydomain.ru.log; error_log /var/log/nginx/error.blog.mydomain.ru.log; location / { try_files $uri $uri/ =404; } location ~ \.php$ { fastcgi_pass unix:/var/run/php5-fpm-blog.sock; fastcgi_index index.php; include fastcgi_params; } location ~ /\.ht { deny all; } }