user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
sendfile on;
#tcp_nopush on;
keepalive_timeout 2;
gzip on;
server {
listen 80;
root /var/www/site1.ru/htdocs;
server_name site1.ru site1.ru;
access_log /var/www/site1.ru/logs/access.log;
error_log /var/www/site1.ru/logs/error.log;
client_max_body_size 64m;
location / {
try_files $uri $uri/ @pro-stroyku_entry;
index index.html index.php;
}
location ~ \.php$ {
try_files $uri @pro-stroyku_entry;
fastcgi_pass unix:/tmp/php-fcgi.sock;
include /etc/nginx/fastcgi_params;
fastcgi_param DOCUMENT_ROOT /var/www/site1.ru/htdocs;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht { return 403; }
location @pro-stroyku_entry {
fastcgi_pass unix:/tmp/php-fcgi.sock;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
server {
listen 80;
root /var/www/site2.ru/htdocs;
server_name site2.ru www.site2.ru;
access_log /var/www/site2.ru/logs/access.log;
error_log /var/www/site2.ru/logs/error.log;
client_max_body_size 64m;
location / {
try_files $uri $uri/ @d400_entry;
index index.html index.php;
}
location ~ \.php$ {
try_files $uri @d400_entry;
fastcgi_pass unix:/tmp/php-fcgi.sock;
include /etc/nginx/fastcgi_params;
fastcgi_param DOCUMENT_ROOT /var/www/site2.ru/htdocs;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht { return 403; }
location @d400_entry {
fastcgi_pass unix:/tmp/php-fcgi.sock;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
server {
listen 80;
root /var/www/site3.ru/htdocs;
server_name site3.ru www.site3.ru;
access_log /var/www/site3.ru/logs/access.log;
error_log /var/www/site3.ru/logs/error.log;
client_max_body_size 64m;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
try_files $uri $uri/ /index.php;
fastcgi_pass unix:/tmp/php-fcgi.sock;
include /etc/nginx/fastcgi_params;
fastcgi_param DOCUMENT_ROOT /var/www/site3.ru/htdocs;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht { return 403; }
}
}
проблема решилась настройкой NGINX и PHP-FCGI.
в NGINX был добавлен еще один воркер (был 1) worker_processes 2;
и PHP-FCGI
PHP_FCGI_CHILD=2 (было 5)
EX="$SPAWNFCGI -P /var/run/fcgi.pid -s $FCGISOCKET -f $FCGIPROGRAM -u $USERID -g $GROUPID -F 2 -C 1 $PHP_FCGI_CHILD"