nginx wordpress configuration SSL upstream: "fastcgi://127.0.0.1:9000"

I installed wordpress in my server and i tried to access to it but i got the error :
2017/04/08 18:31:26 [error] 31868#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 160.178.227.176, server: www.succeeddoctor.com, request: “GET / HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “www.succeeddoctor.com”

My configuration is :
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

events {
    worker_connections 1024;
}

http {
    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;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;

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

    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/conf.d/*.conf;

    # HTTPS server
    #
    server {
        listen       443 ssl;
        server_name  www.succeeddoctor.com;
        error_log /var/log/nginx/servererror.log;
        rewrite_log on;
        ssl_certificate      /var/certs/www.succeeddoctor.com.crt;
        ssl_certificate_key  /var/certs/www.succeeddoctor.com.key;

        ssl_session_cache    shared:SSL:10m;
        ssl_session_timeout  10m;

        ssl_ciphers  HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers  on;

        location / {
               root    /etc/nginx/html;
               try_files $uri /index.php?$args;
               index index.php;
        }

        location ~ .php$ {
                root           /etc/nginx/html;
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME              
  $document_root$fastcgi_script_name;
            include        fastcgi_params;
    }

    location ^~ /windoctor {
            alias /usr/local/tomcat7/windoctorapp/windoctor;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $http_host;
            proxy_set_header X-Forwarded-Proto https;
            proxy_redirect off;
            proxy_connect_timeout      240;
            proxy_send_timeout         240;
            proxy_read_timeout         240;
            proxy_pass http://127.0.0.1:8642/;
      }

   }

}

Thanks for your help.

Read more here: nginx wordpress configuration SSL upstream: "fastcgi://127.0.0.1:9000"

Leave a Reply

Your email address will not be published. Required fields are marked *