0

我目前正在设置 NGINX 以与我的家庭媒体服务器一起使用,并允许我通过organizr连接到我的 dPVR,例如雷达和声纳。我遇到的问题是,在为这些服务添加 auth-request 到我的每个位置块时,它们都在组织者身份验证之后,所有站点要么给出错误 500、504,要么尝试加载一些资产,但大多数返回 504,尽管配置为示例所建议的那样。主机服务器正在运行带有 Nginx 1.12.2 和 php-7.1.10 的 windows 2012R2。我的 nginx.conf 文件如下;

worker_processes  1;

events {
worker_connections  1024;
}

http {
include       mime.types;
default_type  application/octet-stream;

log_format upstreamlog '[$time_local] $remote_addr - $remote_user - $server_name  to: $upstream_addr: $request upstream_response_time $upstream_response_time msec $msec request_time $request_time';

sendfile        on;
keepalive_timeout  65;

upstream sonarr-upstream        { server 127.0.0.1:8989; }
upstream plexpy-upstream        { server 127.0.0.1:8181; }
upstream deluge-upstream        { server 127.0.0.1:8112; }
upstream radarr-upstream        { server 127.0.0.1:7878; }
upstream jackett-upstream       { server 127.0.0.1:9117; }

server {
    listen       80;
    server_name  homeserv.mydomain.me 192.168.1.134;

    error_log c:/nginx/logs/www.error.log info;
    access_log c:/nginx/logs/www.access.log;

    set $return $request_uri;
    set $return_host $host;

    proxy_set_header   Host             $host;
    proxy_set_header   X-Real-IP        $remote_addr;
    proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;

    proxy_connect_timeout      90s;
    proxy_send_timeout         90s;
    proxy_read_timeout         90s;

    proxy_buffer_size          4k;
    proxy_buffers              4 32k;
    proxy_busy_buffers_size    64k;
    proxy_temp_file_write_size 64k;

    gzip on;
    gzip_vary on;
    gzip_min_length 1000;
    gzip_proxied any;
    gzip_types text/plain text/html text/css text/xml application/xml text/javascript application/x-javascript image/svg+xml;
    gzip_disable "MSIE [1-6]\.";

    root   c:/nginx/html/organizr;
    index  index.php index.html index.htm;

    error_page 400 401 403 404 405 408 500 502 503 504  http://homeserv.mydomain.me/error.php?error=$status;

    #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   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        fastcgi_read_timeout 60s;
        include        fastcgi_params;
    }

    location = /auth-admin {
        internal;
        proxy_pass http://homeserv.mydomain.me/auth.php?admin;
        proxy_pass_request_body off;
        proxy_set_header Content-Length "";
        proxy_set_header X-Original-URI $request_uri;
    }

    location = /auth-user {
        rewrite ^ /auth.php?user;
    }

    location ~\.(json|db|log|)$ {
        return 404;
    }

    ##############
    # Reverse Proxies
    ##############

    location /radarr {
        auth_request /auth-admin;
        proxy_pass http://radarr-upstream; 
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        access_log c:/nginx/logs/access.log upstreamlog;
    }

    location /sonarr {
        auth_request /auth-admin;
        proxy_pass http://sonarr-upstream; 
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        access_log c:/nginx/logs/access.log upstreamlog;
    }

    location /plexpy {
        auth_request /auth-admin;
        proxy_pass http://plexpy-upstream; 
        proxy_redirect http:// $scheme://;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header    X-Forwarded-Host    $server_name;
        access_log c:/nginx/logs/access.log upstreamlog;
    }

    location /deluge {  
        auth_request /auth-admin;
        proxy_pass http://deluge-upstream/; 
        proxy_set_header        Host            $host;
        proxy_set_header        X-Real-IP       $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        X-Deluge-Base   "/deluge/";
        add_header              X-Frame-Options SAMEORIGIN;
        access_log c:/nginx/logs/access.log upstreamlog;
    }

    location /jackett {
        auth_request /auth-admin;
        proxy_pass http://jackett-upstream/;            
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        access_log c:/nginx/logs/access.log upstreamlog;
    }


    #deny access to .htaccess files, if Apache's document root
    #concurs with nginx's one

    location ~ /\.ht {
        deny  all;
    }
}

# HTTPS server
#
#server {
#    listen       443 ssl;
#    server_name  localhost;

#    ssl_certificate      cert.pem;
#    ssl_certificate_key  cert.key;

#    ssl_session_cache    shared:SSL:1m;
#    ssl_session_timeout  5m;

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

#    location / {
#        root   html;
#        index  index.html index.htm;
#    }
#}
}

在查看我的错误日志后,关于上游超时或意外的身份验证响应反复出现相同的错误,我还将包括我的 php 和访问日志。底部的上游日志也表明它达到了 90 年代代理超时?如果有人可以建议是什么打破了这将是太棒了!

2017/11/08 17:30:10 [error] 8732#8740: *3 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /ajax.php?a=get-calendar HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.134", referrer: "http://192.168.1.134/homepage.php"
2017/11/08 17:31:10 [error] 8732#8740: *3 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /ajax.php?a=get-calendar HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.134", referrer: "http://192.168.1.134/homepage.php"
2017/11/08 17:31:25 [error] 8732#8740: *11 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 127.0.0.1, server: homeserv.mydomain.me, request: "GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1", subrequest: "/auth-admin", upstream: "http://5.*.*.130:80/auth.php?admin", host: "localhost"
2017/11/08 17:31:25 [error] 8732#8740: *11 auth request unexpected status: 302 while sending to client, client: 127.0.0.1, server: homeserv.mydomain.me, request: "GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1", host: "localhost"
2017/11/08 17:31:39 [error] 8732#8740: *2 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /radarr HTTP/1.1", subrequest: "/auth-admin", upstream: "http://5.*.*.130:80/auth.php?admin", host: "192.168.1.134", referrer: "http://192.168.1.134/"
2017/11/08 17:31:39 [error] 8732#8740: *2 auth request unexpected status: 302 while sending to client, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /radarr HTTP/1.1", host: "192.168.1.134", referrer: "http://192.168.1.134/"
2017/11/08 17:32:10 [error] 8732#8740: *3 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /ajax.php?a=get-calendar HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.134", referrer: "http://192.168.1.134/homepage.php"
2017/11/08 17:32:55 [error] 8732#8740: *15 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 127.0.0.1, server: homeserv.mydomain.me, request: "GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1", subrequest: "/auth-admin", upstream: "http://5.*.*.130:80/auth.php?admin", host: "localhost"
2017/11/08 17:32:55 [error] 8732#8740: *15 auth request unexpected status: 302 while sending to client, client: 127.0.0.1, server: homeserv.mydomain.me, request: "GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1", host: "localhost"
2017/11/08 17:33:10 [error] 8732#8740: *3 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /ajax.php?a=get-calendar HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.134", referrer: "http://192.168.1.134/homepage.php"
2017/11/08 17:33:34 [error] 8732#8740: *18 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /sonarr HTTP/1.1", subrequest: "/auth-admin", upstream: "http://5.*.*.130:80/auth.php?admin", host: "192.168.1.134", referrer: "http://192.168.1.134/"
2017/11/08 17:33:34 [error] 8732#8740: *18 auth request unexpected status: 302 while sending to client, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /sonarr HTTP/1.1", host: "192.168.1.134", referrer: "http://192.168.1.134/"
2017/11/08 17:34:10 [error] 8732#8740: *3 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /ajax.php?a=get-calendar HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.134", referrer: "http://192.168.1.134/homepage.php"
2017/11/08 17:34:26 [error] 8732#8740: *21 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 127.0.0.1, server: homeserv.mydomain.me, request: "GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1", subrequest: "/auth-admin", upstream: "http://5.*.*.130:80/auth.php?admin", host: "localhost"
2017/11/08 17:34:26 [error] 8732#8740: *21 auth request unexpected status: 302 while sending to client, client: 127.0.0.1, server: homeserv.mydomain.me, request: "GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1", host: "localhost"
2017/11/08 17:35:10 [error] 8732#8740: *3 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /ajax.php?a=get-calendar HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.134", referrer: "http://192.168.1.134/homepage.php"
2017/11/08 17:35:28 [error] 8732#8740: *24 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /jackett HTTP/1.1", subrequest: "/auth-admin", upstream: "http://5.*.*.130:80/auth.php?admin", host: "192.168.1.134", referrer: "http://192.168.1.134/"
2017/11/08 17:35:28 [error] 8732#8740: *24 auth request unexpected status: 302 while sending to client, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /jackett HTTP/1.1", host: "192.168.1.134", referrer: "http://192.168.1.134/"
2017/11/08 17:35:56 [error] 8732#8740: *26 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 127.0.0.1, server: homeserv.mydomain.me, request: "GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1", subrequest: "/auth-admin", upstream: "http://5.*.*.130:80/auth.php?admin", host: "localhost"
2017/11/08 17:35:56 [error] 8732#8740: *26 auth request unexpected status: 302 while sending to client, client: 127.0.0.1, server: homeserv.mydomain.me, request: "GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1", host: "localhost"
2017/11/08 17:36:10 [error] 8732#8740: *3 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /ajax.php?a=get-calendar HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.134", referrer: "http://192.168.1.134/homepage.php"
2017/11/08 17:37:10 [error] 8732#8740: *3 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /ajax.php?a=get-calendar HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.134", referrer: "http://192.168.1.134/homepage.php"
2017/11/08 17:37:26 [error] 8732#8740: *30 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 127.0.0.1, server: homeserv.mydomain.me, request: "GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1", subrequest: "/auth-admin", upstream: "http://5.*.*.130:80/auth.php?admin", host: "localhost"
2017/11/08 17:37:26 [error] 8732#8740: *30 auth request unexpected status: 302 while sending to client, client: 127.0.0.1, server: homeserv.mydomain.me, request: "GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1", host: "localhost"
2017/11/08 17:38:10 [error] 8732#8740: *36 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /ajax.php?a=get-calendar HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.134", referrer: "http://192.168.1.134/homepage.php"
2017/11/08 17:38:28 [error] 8732#8740: *36 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /settings.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.134", referrer: "http://192.168.1.134/"
2017/11/08 17:38:41 [error] 8732#8740: *3 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /deluge HTTP/1.1", subrequest: "/auth-admin", upstream: "http://5.*.*.130:80/auth.php?admin", host: "192.168.1.134", referrer: "http://192.168.1.134/"
2017/11/08 17:38:41 [error] 8732#8740: *3 auth request unexpected status: 302 while sending to client, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /deluge HTTP/1.1", host: "192.168.1.134", referrer: "http://192.168.1.134/"
2017/11/08 17:38:57 [error] 8732#8740: *34 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 127.0.0.1, server: homeserv.mydomain.me, request: "GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1", subrequest: "/auth-admin", upstream: "http://5.*.*.130:80/auth.php?admin", host: "localhost"
2017/11/08 17:38:57 [error] 8732#8740: *34 auth request unexpected status: 302 while sending to client, client: 127.0.0.1, server: homeserv.mydomain.me, request: "GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1", host: "localhost"
2017/11/08 17:39:10 [error] 8732#8740: *36 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /ajax.php?a=get-calendar HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.134", referrer: "http://192.168.1.134/homepage.php"
2017/11/08 17:40:10 [error] 8732#8740: *36 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /ajax.php?a=get-calendar HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.134", referrer: "http://192.168.1.134/homepage.php"
2017/11/08 17:40:27 [error] 8732#8740: *40 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 127.0.0.1, server: homeserv.mydomain.me, request: "GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1", subrequest: "/auth-admin", upstream: "http://5.*.*.130:80/auth.php?admin", host: "localhost"
2017/11/08 17:40:27 [error] 8732#8740: *40 auth request unexpected status: 302 while sending to client, client: 127.0.0.1, server: homeserv.mydomain.me, request: "GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1", host: "localhost"
2017/11/08 17:41:10 [error] 8732#8740: *36 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /ajax.php?a=get-calendar HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.134", referrer: "http://192.168.1.134/homepage.php"
2017/11/08 17:41:57 [error] 8732#8740: *43 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 127.0.0.1, server: homeserv.mydomain.me, request: "GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1", subrequest: "/auth-admin", upstream: "http://5.*.*.130:80/auth.php?admin", host: "localhost"
2017/11/08 17:41:57 [error] 8732#8740: *43 auth request unexpected status: 302 while sending to client, client: 127.0.0.1, server: homeserv.mydomain.me, request: "GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1", host: "localhost"
2017/11/08 17:42:11 [error] 8732#8740: *36 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 192.168.1.134, server: homeserv.mydomain.me, request: "GET /ajax.php?a=get-calendar HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.134", referrer: "http://192.168.1.134/homepage.php"

PHP日志:

[08-Nov-2017 17:31:25 Europe/London] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in C:\nginx\html\organizr\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 509
[08-Nov-2017 17:32:55 Europe/London] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in C:\nginx\html\organizr\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 509
[08-Nov-2017 17:34:26 Europe/London] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in C:\nginx\html\organizr\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 509
[08-Nov-2017 17:35:56 Europe/London] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in C:\nginx\html\organizr\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 509
[08-Nov-2017 17:37:26 Europe/London] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in C:\nginx\html\organizr\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 509
[08-Nov-2017 17:38:57 Europe/London] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in C:\nginx\html\organizr\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 509
[08-Nov-2017 17:40:27 Europe/London] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in C:\nginx\html\organizr\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 509

最后访问日志

[08/Nov/2017:17:31:25 +0000] 127.0.0.1 - - - homeserv.mydomain.me  to: -: GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1 upstream_response_time - msec 1510162285.533 request_time 90.001
[08/Nov/2017:17:31:39 +0000] 192.168.1.134 - - - homeserv.mydomain.me  to: -: GET /radarr HTTP/1.1 upstream_response_time - msec 1510162299.296 request_time 90.000
[08/Nov/2017:17:32:55 +0000] 127.0.0.1 - - - homeserv.mydomain.me  to: -: GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1 upstream_response_time - msec 1510162375.845 request_time 90.001
[08/Nov/2017:17:33:34 +0000] 192.168.1.134 - - - homeserv.mydomain.me  to: -: GET /sonarr HTTP/1.1 upstream_response_time - msec 1510162414.407 request_time 90.000
[08/Nov/2017:17:34:26 +0000] 127.0.0.1 - - - homeserv.mydomain.me  to: -: GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1 upstream_response_time - msec 1510162466.175 request_time 90.001
[08/Nov/2017:17:35:28 +0000] 192.168.1.134 - - - homeserv.mydomain.me  to: -: GET /jackett HTTP/1.1 upstream_response_time - msec 1510162528.996 request_time 90.000
[08/Nov/2017:17:35:56 +0000] 127.0.0.1 - - - homeserv.mydomain.me  to: -: GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1 upstream_response_time - msec 1510162556.497 request_time 90.015
[08/Nov/2017:17:37:26 +0000] 127.0.0.1 - - - homeserv.mydomain.me  to: -: GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1 upstream_response_time - msec 1510162646.825 request_time 90.000
[08/Nov/2017:17:38:41 +0000] 192.168.1.134 - - - homeserv.mydomain.me  to: -: GET /deluge HTTP/1.1 upstream_response_time - msec 1510162721.269 request_time 90.001
[08/Nov/2017:17:38:57 +0000] 127.0.0.1 - - - homeserv.mydomain.me  to: -: GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1 upstream_response_time - msec 1510162737.113 request_time 90.002
[08/Nov/2017:17:40:27 +0000] 127.0.0.1 - - - homeserv.mydomain.me  to: -: GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1 upstream_response_time - msec 1510162827.444 request_time 90.003
[08/Nov/2017:17:41:57 +0000] 127.0.0.1 - - - homeserv.mydomain.me  to: -: GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1 upstream_response_time - msec 1510162917.770 request_time 90.014
[08/Nov/2017:17:43:28 +0000] 127.0.0.1 - - - homeserv.mydomain.me  to: -: GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1 upstream_response_time - msec 1510163008.118 request_time 90.013
[08/Nov/2017:17:44:58 +0000] 127.0.0.1 - - - homeserv.mydomain.me  to: -: GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1 upstream_response_time - msec 1510163098.517 request_time 90.008
[08/Nov/2017:17:46:28 +0000] 127.0.0.1 - - - homeserv.mydomain.me  to: -: GET /sonarr/api/calendar?start=2017-10-09&end=2017-12-08 HTTP/1.1 upstream_response_time - msec 1510163188.847 request_time 90.014
4

1 回答 1

0

改变:

    location = /auth-admin {
    internal;
    proxy_pass http://homeserv.mydomain.me/auth.php?admin;
    proxy_pass_request_body off;
    proxy_set_header Content-Length "";
    proxy_set_header X-Original-URI $request_uri;
}

至:

location = /auth-admin{
    rewrite ^ /auth.php?admin;
}

此外,您应该在 php.ini 中启用 OPCache。

在 php.ini 中:找到:[opcache]

在后面添加这一行:zend_extension=php_opcache.dll

然后确保设置了这些值:

opcache.enable=1
opcache.memory_consumption=192
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=10000
opcache.fast_shutdown=1

对于狗屎和傻笑,编辑 php 块并添加空白位置块:

    location / { }

    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;
    }
于 2017-11-09T16:06:26.957 回答