Друзья, я поставил nginx + прикрутил к нему fastcgi.. php вроде бы больше не скачивается, как раньше.. теперь по любому искомому пути.. сервер мне радостно сообщает PHP: No input file specified. Хотя.. файлы там есть.. я уже 100 раз перепроверил конфиг nginx.. PHP: user www-data; worker_processes 3; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; server_names_hash_max_size 2048; server_names_hash_bucket_size 128; server { listen 80; server_name имя_сервера; #в целях безопасности - стер. charset utf8; client_max_body_size 25m; # 25нВБКФ ДМС body (л РТЙНЕТХ, ЧМПЦЕОЙЕ Ч РЙУШНЕ) location / { root /var/www/; index index.html index.php; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /var/www/; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/php$fastcgi_script_name; include fastcgi_params; } location /nginx-status { # ьФП ДМС РТПУНПФТБ УФБФЙУФЙЛЙ РП http://йнс_уетчетб ЙМЙ IP_бДТЕУ/nginx-status stub_status on; access_log off; allow 192.168.2.0/24; deny all; } } } Все файлы веба лежат в /var/www/ там же и index.php ps -ef и узнаем какие процессы запущены PHP: www-data 5442 1 0 00:20 ? 00:00:00 /usr/bin/php5-cgi www-data 5457 5442 0 00:20 ? 00:00:00 /usr/bin/php5-cgi www-data 5458 5442 0 00:20 ? 00:00:00 /usr/bin/php5-cgi www-data 5460 5442 0 00:20 ? 00:00:00 /usr/bin/php5-cgi www-data 5469 5442 0 00:20 ? 00:00:00 /usr/bin/php5-cgi www-data 5471 5442 0 00:20 ? 00:00:00 /usr/bin/php5-cgi root 27932 1 0 00:49 ? 00:00:00 nginx: master process nginx www-data 27933 27932 0 00:49 ? 00:00:00 nginx: worker process www-data 27934 27932 0 00:49 ? 00:00:00 nginx: worker process www-data 27935 27932 0 00:49 ? 00:00:00 nginx: worker process Вроде бы все работает.. где я ошибся? ++.. я уже обгуглся.. по поводу этой "..No input file specified. ."
Pashkela, большой низачет. я не просил тыкать меня в инструкции, а спросил реального решения проблемы. это все ( и php и fast cgi ) запущено и настроено.. я что-то прозевал в конфиге, поэтому и спрашиваю у товарищей. Я же написал в первом посте, что поисковиками пользовался Тем более .. сабжевая ошибка - это некий аналог 404 у апача..
Ну если ты все так внимательно прочитал в той статье, то сравни свою конфиг и что там написано в примере - http://blog.kovyrin.net/files/nginx-conf/php-fcgi.nginx.conf: PHP: # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { fastcgi_pass 127.0.0.1:12345; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/local/nginx/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;
Понятно. На всякий случай полный вариант: PHP: user www-data www-data; worker_processes 2; error_log logs/error.log debug; pid logs/nginx.pid; events { worker_connections 1024; } http { include conf/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] $status ' '"$request" $body_bytes_sent "$http_referer" ' '"$http_user_agent" "http_x_forwarded_for"'; access_log logs/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; server { listen 80; #listen 192.168.1.1; #listen 192.168.1.1:8080; server_name some-server.com www.server-name.com; access_log logs/host.access.log main; location / { root html; index index.html index.htm index.php; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { fastcgi_pass 127.0.0.1:12345; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/local/nginx/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; } } } запуск самого PHP с использованием встроенного менеджера FastCGI-запросов при помощи следующего скрипта: Code: #!/bin/bash ## ABSOLUTE path to the PHP binary PHPFCGI="/opt/php/bin/php" ## tcp-port to bind on FCGIPORT="8888" ## IP to bind on FCGIADDR="127.0.0.1" ## number of PHP children to spawn PHP_FCGI_CHILDREN=5 ## number of request before php-process will be restarted PHP_FCGI_MAX_REQUESTS=1000 # allowed environment variables sperated by spaces ALLOWED_ENV="ORACLE_HOME PATH USER" ## if this script is run as root switch to the following user USERID=www-data ################## no config below this line if test x$PHP_FCGI_CHILDREN = x; then PHP_FCGI_CHILDREN=5 fi ALLOWED_ENV="$ALLOWED_ENV PHP_FCGI_CHILDREN" ALLOWED_ENV="$ALLOWED_ENV PHP_FCGI_MAX_REQUESTS" ALLOWED_ENV="$ALLOWED_ENV FCGI_WEB_SERVER_ADDRS" if test x$UID = x0; then EX="/bin/su -m -c \"$PHPFCGI -q -b $FCGIADDR:$FCGIPORT\" $USERID" else EX="$PHPFCGI -b $FCGIADDR:$FCGIPORT" fi echo $EX # copy the allowed environment variables E= for i in $ALLOWED_ENV; do E="$E $i=${!i}" done # clean environment and set up a new one nohup env - $E sh -c "$EX" &> /dev/null &