Nginx конфигурация не работает

Есть некоторый location в конфе nginx:

location /ctftime {
    include proxy_params;
    proxy_pass http://localhost:8011$request_uri;
}

То-есть, у меня на сервере локально поднята связка Python + Flask и хотелось бы, чтобы при request на https://xxx.ru/ctftime был proxy_pass на непосредственно http://localhost:8011$request_uri.

Сама связка работает, это подтверждает curl http://localhost:8011/ctftime/teams/get/top/2020/50, которая возвращает верный результат запроса.

При запросе же https://xxx.ru/ctftime/teams/get/top/2020/50 я получаю либо редирект на корень, либо 500.

Ну и полный конфиг на всякий случай:

server {
    server_name xxx.ru  www.xxx.ru;
    listen 443 ssl;
    listen [::]:443 ssl ipv6only=on;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
    ssl_certificate /etc/letsencrypt/live/xxx.ru/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/xxx.ru/privkey.pem;
    location / {
        return 301 https://yyy.xxx.ru/;
    }

    location /zalgo {
       include proxy_params;
       proxy_pass http://localhost:8000/zalgo;
    }

    location /ctftime {
       include proxy_params;
       proxy_pass http://localhost:8011$request_uri;
    }
}
server {
    listen 80;
    listen [::]:80;

    server_name xxx.ru www.xxx.ru;

    if ($host = xxx.ru) {
       return 301 https://$host$request_uri;
    }

    if ($host = www.xxx.ru) {
       return 301 https://$host$request_uri;
    }
}

Ответы (0 шт):