linux - nginx-php doesn't work with own build nginx -


i compiled nginx configure command:

./configure --with-http_ssl_module --add-module=../nginx-rtmp-module-master 

then did make install install it, has been added can't execute php file, gives me error when try open page :( (i have installed php-fpm)

here nginx.conf file:

#user  nobody; worker_processes  1;  #error_log  logs/error.log; #error_log  logs/error.log  notice; #error_log  logs/error.log  info;  #pid        logs/nginx.pid;   events {     worker_connections  1024; }   http {     include       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"';      #access_log  logs/access.log  main;      sendfile        on;     #tcp_nopush     on;      #keepalive_timeout  0;     keepalive_timeout  65;      #gzip  on;      server {         listen       80;         #server_name  localhost;          #charset koi8-r;          #access_log  logs/host.access.log  main;          location / {             root   html;             index  index.html index.htm;         }          #error_page  404              /404.html;          # redirect server error pages static page /50x.html         #         error_page   500 502 503 504  /50x.html;         location = /50x.html {             root   html;         }      location ~* \.php$ {         root html;             fastcgi_index   index.php;             #fastcgi_pass    127.0.0.1:9000;             fastcgi_pass unix:/var/run/php5-fpm.sock;         include         fastcgi_params;             fastcgi_param   script_filename    $document_root$fastcgi_script_name;             fastcgi_param   script_name        $fastcgi_script_name;     }          # proxy php scripts apache listening on 127.0.0.1:80         #         #location ~ \.php$ {         #    proxy_pass   http://127.0.0.1;         #}          # pass php scripts fastcgi server listening on 127.0.0.1:9000         #         #location ~ \.php$ {         #    root           html;         #    fastcgi_pass   127.0.0.1:9000;         #    fastcgi_index  index.php;         #    fastcgi_param  script_filename  /scripts$fastcgi_script_name;         #    include        fastcgi_params;         #}          # deny access .htaccess files, if apache's document root         # concurs nginx's 1         #         #location ~ /\.ht {         #    deny  all;         #}     }       # virtual host using mix of ip-, name-, , 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  high:!anull:!md5;     #    ssl_prefer_server_ciphers   on;      #    location / {     #        root   html;     #        index  index.html index.htm;     #    }     #}  }  rtmp {         server {                 listen 1935;                 chunk_size 4096;                  application live {                         live on;                         record off;                 }         } } 

and here error log output:

2014/09/10 15:52:16 [notice] 22803#0: signal process started 2014/09/10 15:52:39 [notice] 22808#0: signal process started 2014/09/10 15:57:21 [notice] 22819#0: signal process started 2014/09/10 16:02:15 [error] 22891#0: *1 connect() failed (111: connection refused) while c$ 2014/09/10 16:03:36 [crit] 22947#0: *1 connect() unix:/var/run/php5-fpm.sock failed (13$ 2014/09/10 16:05:41 [crit] 23002#0: *2 connect() unix:/var/run/php5-fpm.sock failed (13$ 2014/09/10 16:06:26 [crit] 23057#0: *1 connect() unix:/var/run/php5-fpm.sock failed (13$ 2014/09/10 16:06:26 [crit] 23057#0: *1 connect() unix:/var/run/php5-fpm.sock failed (13$ 2014/09/10 16:06:27 [crit] 23057#0: *1 connect() unix:/var/run/php5-fpm.sock failed (13$ 

it's looks not have permission, how can give right permission nginx ?

imfamous error listen directive, must equal nginx , php-fpm. if use socket in nginx.conf, must use socket in php-fpm pool conf (e.g. /etc/php5/fpm/pool.d/www.conf debian)

nginx.conf (you set already):

fastcgi_pass unix:/var/run/php5-fpm.sock; 

php-fpm www.conf:

listen = /var/run/php5-fpm.sock 

if these settings not help, try set listen.* nginx's user (e.g. www-data debian)

php-fpm www.conf:

listen.owner = www-data listen.group = www-data 

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -