78844

ngix and php5-fpm blank page

Question:

iam trying to include php5-fpm into my nginx. but i only get an blank page. And i dont really know why. i installed ngix-portable (<a href="https://github.com/moezzie/nginx-portable/blob/master/README.md" rel="nofollow">https://github.com/moezzie/nginx-portable/blob/master/README.md</a>) and my config file is:

#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 8080; 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 to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # 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 $document_root$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 HIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #} }

The PHP5-FPM listens on port 9000 i can open with telnet a port. Where is my error :(?

Answer1:

I’ve seen inconsistent implementation between SCRIPT_FILENAME and SCRIPT_NAME params, so I define them both like this:

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name;

Recommend

  • My node.js app is getting an Unhandled 'error' event randomly on writing requests after I
  • HTTPS GZIP NGINX WTF
  • Unable to Get Ip address of the http request : Asp.Net [C#]
  • PHP session variable won't change
  • IP addresses get stored as 0 when converting with PHP ip2long function
  • How to correct this mysql_query, use the right syntax and make it work?
  • Log Specific IP address of a Registered User
  • How to set vars into ansible inventory?
  • How to get Public IP address using PHP? [duplicate]
  • Optionally pass REMOTE_USER to application
  • ngix and php5-fpm blank page
  • How can I get the client's IP address in a PHP webservice? [duplicate]
  • .htaccess Rewrite url with images from a folder to a php file
  • $_SERVER['REMOTE_ADDR'] is not returning ip address
  • Fatal error: Call to undefined function add_filter() in index.php in Wordpress
  • Missing Content-Length header when using Nginx + Gzip + Unicorn
  • .htaccess allow only from Chrome, Opera, Mozilla, Safari, redirect from others
  • How can I get the screen size of mobile devices when they hit my web server?
  • .net HTTP_X_FORWARDED_FOR NULL on localhost
  • Instanciate service on startup in Angular2
  • Configure nginx to return different files to different authenticated users with the same URI
  • How do I get the list of bad records that didn't load in Bigquery?
  • SQL Query - Table Joining Problems
  • Can't remove headers after they are sent
  • How to use JavaScript to determine whether a file exists in a directory?
  • How do I pass the string value parameter of the selected list item from an auto-populated dropdown l
  • Seeking advice on Jetty HttpClient Hang
  • How would I use PHP exceptions to define a redirect?
  • How to redirect a user to a different server and include HTTP basic authentication credentials?
  • Can I have the cursor start on a particular column by default in jqgrid's edit mode?
  • Symfony2: How to get request parameter
  • log4net write single file for each call to log.info
  • Getting error when using KSoap library to consume .NET web services