nginx wordpress配置SSL上游:“fastcgi://127.0.0.1:9000”

时间:2017-04-08 19:01:00

标签: wordpress ssl nginx

我在我的服务器上安装了wordpress,我试图访问它,但是我得到了错误: 2017/04/08 18:31:26 [错误] 31868#0:* 1连接()失败(111:连接被拒绝)连接上游,客户端:160.178.227.176,服务器:www.succeeddoctor.com,请求: “GET / HTTP / 1.1”,上游:“fastcgi://127.0.0.1:9000”,主持人:“www.succeeddoctor.com”

我的配置是:     #有关配置的更多信息,请参阅:     #*官方英文文档:http://nginx.org/en/docs/     #*俄罗斯官方文档: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/;
      }

   }

}

感谢您的帮助。

0 个答案:

没有答案