Nginx wp-admin Upstreamtime

1

Eu configurei o Nginx conforme as instruções, tudo funciona, mas meu wp-admin está retornando um erro 504 ( upstream timeout ).

Tudo funciona corretamente, tudo reescreve, etc.

Eu tentei redimensioná-lo de volta ao básico sem cache etc., mas ainda nada.

fastcgi_cache_path /var/run/nginx-cache levels=1:2 keys_zone=MYAPP:100m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";

server {
    listen 82 default_server;
    listen [::]:82 default_server ipv6only=on;

    root /mnt/wpmount/nen;
    index index.php index.html index.htm;

    # Make site accessible from http://localhost/
    server_name localhost;

    location / {

        if ($args ~* "^s=(.*)$")
        {
            return 301 /search/$1;
        }
        #try_files $uri $uri/ /index.php?q=$uri&$args;
        try_files $uri $uri/ /index.php?$args;
    }

        location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
          expires 1M;
          access_log off;
          add_header Cache-Control "public";
        }

    location ~* /(?:uploads|files)/.*\.php$ {
            deny all;
    }

    location ~* \.(pl|cgi|py|sh|lua)\$ {
            return 444;
    }

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;

        fastcgi_cache MYAPP;
        fastcgi_cache_valid 200 60m;

        fastcgi_cache_bypass $no_cache;
        fastcgi_no_cache $no_cache;
        add_header X-Cache $upstream_cache_status;
    }

    location ~ /\.ht {
        deny all;
    }

#Cache everything by default
set $no_cache 0;

#Don't cache POST requests
if ($request_method = POST)
{
    set $no_cache 1;
}

#Don't cache if the URL contains a query string
if ($query_string != "")
{
    set $no_cache 1;
}

#Don't cache if there is a cookie called PHPSESSID
    if ($http_cookie = "PHPSESSID")
    {
        set $no_cache 1;
    }
}
    
por Stuart.Sklinar 20.03.2016 / 21:59

0 respostas