PDA

Просмотр полной версии : /usr/bin/php-fastcgi: Permission denied


Belfigor
17.09.2008, 23:03
Люди всем доброй ночи , у меня вот какая хрень решил я поменять связку на своём серваке, щас у меня стоит Lighttpd и всё пашет норм , но я хочу эту связку ТУТ (http://www.howtoforge.com/nginx_php5_fast_cgi_xcache_ubuntu7.04) , но с ней не большой косяк будьте добры помогите уже вторые сутки не сплю :(
Делаю всё вот по этому ману ТУТ (http://www.howtoforge.com/nginx_php5_fast_cgi_xcache_ubuntu7.04)

всё идёт как по маслу , задаю права chmod 755 /etc/init.d/init-fastcgi

далее /etc/init.d/init-fastcgi start , и вылезает вот что debian:/home/belfigor# /etc/init.d/init-fastcgi start
/etc/init.d/init-fastcgi: line 6: /usr/bin/php-fastcgi: Permission denied

ну и соответственно не открывается

<?
phpinfo();
?>

сам nginx пашет нормально , команда ps ax | grep php пишет вот что 3419 pts/2 D+ 0:00 grep php

помогите не проходите мимо , я хоть уже намучался , но нужно решить пробему , чтобы другие люди не мыкались :rolleyes:

SpangeBoB
17.09.2008, 23:29
chmod 755 /usr/bin/php-fastcgi

Belfigor
17.09.2008, 23:48
chmod 755 /usr/bin/php-fastcgi

To SpangeBoB спасибо, процесс запустился , но test.php всё равно пытается скачаться :(

xcedz
18.09.2008, 00:22
To SpangeBoB спасибо, процесс запустился , но test.php всё равно пытается скачаться :(
конфиги может криво настроены? раз пытается скачаться :)

Ky3bMu4
18.09.2008, 16:55
test.php всё равно пытается скачаться

С location ~ \.php$ намудрил
sysoev.ru/nginx/docs/http/ngx_http_fastcgi_module.html

Belfigor
19.09.2008, 00:55
С location ~ \.php$ намудрил
sysoev.ru/nginx/docs/http/ngx_http_fastcgi_module.html

да вроде нет такого , вот мой конфиг

user www-data;
worker_processes 1;

error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
}

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

access_log /var/log/nginx/access.log;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;
tcp_nodelay on;

gzip on;

server {
listen 80;
server_name localhost;

access_log /var/log/nginx/localhost.access.log;

location / {
root /var/www/nginx-default;
index index.html index.php;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/nginx-default;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /var/www/nginx-default$fastcgi_script_name;
# include fastcgi_params;
#}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}


# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;

# location / {
# root html;
# index index.html index.htm;
# }
#}


# HTTPS server
#
#server {
# listen 443;
# server_name localhost;

# ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;

# ssl_session_timeout 5m;

# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSL v2:+EXP;
# ssl_prefer_server_ciphers on;

# location / {
# root html;
# index index.html index.htm;
# }
#}

}

Belfigor
19.09.2008, 01:23
Всё люди пошло !! ура :) :) :D , значит вот тут #location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/nginx-default$fastcgi_script_name;
# include fastcgi_params;
#}

закоментировал стороку # include fastcgi_params;

ps Спасибо всем кто помог и давал советы !!! :)

b3
20.09.2008, 23:58
sudo apt-get install apache2 php5 mysql-server mysql-client
Вот тебе связка с репозитория ))

далее /etc/init.d/init-fastcgi start , и вылезает вот что debian:/home/belfigor# /etc/init.d/init-fastcgi start
/etc/init.d/init-fastcgi: line 6: /usr/bin/php-fastcgi: Permission denied

Такие команды из под root нужно запускать через оператор sudo
но test.php всё равно пытается скачаться

Перезапусти службу апача:
sudo /etc/init.d/apache2 restart
Потом ALT+CTRL+Backspace

Ky3bMu4
21.09.2008, 20:11
apache != nginx - читай внимательней ;)

Belfigor
22.09.2008, 04:16
sudo apt-get install apache2 php5 mysql-server mysql-client
Вот тебе связка с репозитория ))

Такие команды из под root нужно запускать через оператор sudo


Перезапусти службу апача:
sudo /etc/init.d/apache2 restart
Потом ALT+CTRL+Backspace

Спасибо за совет , :) , но Апачем уже давно не пользуюсь, юзаю Lighttpd (http://www.lighttpd.net/) , а теперь полностью доволен этой связкой Nginx+PHP (http://www.howtoforge.com/nginx_php5_fast_cgi_xcache_ubuntu7.04)

вот полностью мой рабочий конфиг (nginx.conf)


user www-data;
worker_processes 1;

error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
}

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

access_log /var/log/nginx/access.log;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;
tcp_nodelay on;

gzip on;

server {
listen 80;
server_name localhost;

access_log /var/log/nginx/localhost.access.log;

location / {
root /var/www/nginx-default;
index index.php;
}

error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/nginx-default;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/nginx-default$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
fastcgi_param HTTPS on;
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}


# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;

# location / {
# root html;
# index index.html index.htm;
# }
#}


# HTTPS server
#
#server {
# listen 443;
# server_name localhost;

# ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;

# ssl_session_timeout 5m;

# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSL v2:+EXP;
# ssl_prefer_server_ciphers on;

# location / {
# root html;
# index index.html index.htm;
# }
#}

}



связка пашет на ура , всем советую ;)