#1667 closed defect (invalid)

Nginx [PHP] sometimes blank page sometimes Connection Refused

Reported by: MayusYT@… Owned by:
Priority: minor Milestone:
Component: other Version: 1.15.x
Keywords: Cc:
uname -a: Linux snapecraft-server 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.15.5

Description

Hello, I switched from apache2 to nginx 2 months ago. I just can't get it to work so I think it has to be a bug. I want to use Wordpress with Nginx.

Output of nginx -v

nginx version: nginx/1.15.5

Output of uname -a

Linux snapecraft-server 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

This is my wordpress.conf, located in /conf.d/:

server {
  listen 80;
  #listen 443 default ssl;

  server_name snapecraft.ddns.net;
  root /var/www/html;

  #ssl_certificate /etc/nginx/ssl/mydomain.crt;
  #ssl_certificate_key /etc/nginx/ssl/mydomain.key;

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

  index index.php index.phtml index.html;

  error_page   500 502 503 504 404  /50x.html;

  location = /50x.html {
        root   /usr/share/nginx/html;
  }


  location ~ \.php$ {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_intercept_errors on;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include /etc/nginx/fastcgi_params;

  }



}

This is my nginx.conf:

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"';

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

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;
}

pool.d/www.conf: listen is set to 127.0.0.1

All logs are empty.

Change History (1)

comment:1 by Maxim Dounin, 21 months ago

Resolution: invalid
Status: newclosed

Blank pages returned by PHP usually indicate that something went wrong on the PHP side. It is not clear where you see connection refused errors, but if these are errors logged by nginx, this usually indicate a problem on the PHP side as well. Consider looking into your PHP configuration and logs to find out what is going wrong.

In either case, clearly there is not enough information to conclude there is a bug in nginx, so I'm closing this ticket. If you needed further help to find out what goes wrong in your configuration, please consider using support options available.

Note: See TracTickets for help on using tickets.