Неоднократно перегружались сервер (целиком) и по отдельности службы: nginx, php-fpm
nginx файл домена host.com.vhost
server {
listen *:80;
server_name host.com www.host.com;
root /var/www/host.com/public_html;
if ($http_host = "host.com") {
rewrite ^ $scheme://www.host.com$request_uri? permanent;
}
index index.html index.htm index.php index.cgi index.pl index.xhtml;
error_log /var/log/host.com/error.log;
access_log off;
location ~ /\. {
deny all; access_log off; log_not_found off;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location /stats {
index index.html index.php;
auth_basic "Members Only";
auth_basic_user_file /var/www/host.com/stats/.htpasswd_stats;
}
location ^~ /awstats-icon {
alias /usr/share/awstats/icon;
}
location ~* ^.+.(jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|swf|flv|xls|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off;
log_not_found off;
expires 1d;
}
location ~* ^.+.(css|js)$ {
access_log off;
log_not_found off;
}
server_tokens off;
error_page 400 /400.php;
error_page 401 /401.php;
error_page 403 /404.php;
error_page 404 /404.php;
error_page 405 /405.php;
error_page 500 /500.php;
error_page 502 /502.php;
error_page 503 /503.php;
recursive_error_pages off;
fastcgi_intercept_errors on;
client_max_body_size 20m;
client_body_buffer_size 128k;
location ^~ /cgi-bin {
return 404;
}
location ~ \.(tpl|log|sql)$ {
deny all; access_log off; log_not_found off;
}
location ~* \.php$ {
if (!-e $document_root$document_uri){return 404;}
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9001;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
location / {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9001;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
root /var/www/host.com/public_html;
}
location /administrators/ {
auth_basic "Members Only";
auth_basic_user_file /var/www/.htaccess/.htpasswd;
}
}