Nginx代理传递在404中运行

时间:2017-11-22 19:18:32

标签: nginx

我有一些docker实例正在运行。一切都运行良好,没有最后一个新的。

我的规则:

server {
       listen         80;
       server_name    sub.domain.tld www.sub.domain.tld;
       return         301 https://sub.domain.tld$request_uri;
}

server {
        #listen 80;
        listen 443;
        server_name sub.domain.tld;
        client_max_body_size 50000M;
        ssl_prefer_server_ciphers On;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS;
        ssl_session_cache shared:ssl_session_cache:10m;
        sendfile on;
        ssl_certificate         /opt/ssl/bundle.crt;
        ssl_certificate         /opt/ssl/bundleRSA.crt;
        ssl_certificate_key     /opt/ssl/privateKey.pem;
        ssl_certificate_key     /opt/ssl/privateKeyRSA.pem;
        ssl on;
        ssl_stapling on;
        ssl_stapling_verify on;
        location / {
                proxy_http_version 1.1; # this is essential for chunked responses to work
                proxy_pass http:/sub.domain.tld:9120;
                proxy_redirect http://127.0.0.1:9120/ /;
                proxy_read_timeout 100s;

                proxy_set_header        Host    $host;
                proxy_set_header        X-Real-IP       $remote_addr;
                proxy_set_header        X-Forwarded_for $proxy_add_x_forwarded_for;
        }
}

这些规则针对19个其他容器运行。 sub.domain.tld显示正确。但是,如果我移动到子页面,我会得到404。 我没有看到错误。有人有想法吗?

0 个答案:

没有答案