Open miversen33 opened 10 months ago
Is there more information that I need to provide to get some kind of feedback about what I may be doing incorrectly here?
Lista
- Você puxou e encontrou o erro com a imagem do docker?
jc21/nginx-proxy-manager:latest
- Sim
- Tem certeza de que não está usando a imagem docker de outra pessoa?
- Sim
- Você já pesquisou por problemas semelhantes (abertos e fechados)?
- Sim
Descreva o bug
Eu tenho o seguinte local definido em um que funciona exatamente como esperado
nginx.conf
location /portainer/ { proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-Ip $remote_addr; proxy_set_header X-Forwarded-For $remote_add_x_forwarded_for; proxy_pass https://hostname.domain:9443/; }
Eu imaginei que seria tão fácil quanto adicionar um novo host proxy no Nginx Proxy Manager, adicionando o local e definindo as várias variáveis proxy_header na seção do local. No entanto, quando eu adiciono literalmente qualquer uma das linhas acima, o local lança um 400. Não consigo ver nada realmente "útil" nos logs de contêiner para nginx-proxy-manager.
/portainer/``advanced``proxy_set_header
Estou sentindo falta de alguma coisa?
Nginx Proxy Manager Versão
v2.10.4
Para reproduzir etapas para reproduzir o comportamento:
- Criar novo host proxy
- Adicionar uma localização
- Adicionar (por exemplo) à seção avançada do local
proxy_set_header X-Real-IP $remote_addr;
- Salve o local
- Navegar em uma nova guia até o local
- Observe 400
Comportamento esperado
Espero que os valores sejam respeitados. Além disso, se houver um erro de configuração ocorrendo, alguma forma de notificação parece uma vantagem
proxy_set_header
Imagens
Eu posso fornecê-los, se necessário
Sistema Operacional
- RHEL 8,8
- Docker versão 24.0.5, build ced0996
Contexto adicional
Executando sob composição usando o seguinte script de composição docker
version: '3.8' services: app: image: 'jc21/nginx-proxy-manager:latest' restart: unless-stopped ports: - '80:80' # Public HTTP Port - '443:443' # Public HTTPS Port - '81:81' # Admin Web Port - '5090-6000:5090-6000' # Snag up any other ports we might want to proxy to volumes: - /opt/docker/npm/:/data
A única coisa que qualquer um dos arquivos de log emite ao salvar é
[aviso] 141#141: não foi possível construir proxy_headers_hash ideal, você deve aumentar proxy_headers_hash_max_size: 512 ou proxy_headers_hash_bucket_size: 64; ignorando proxy_headers_hash_bucket_size
E ao atingir o ponto de extremidade criado, as 2 coisas a seguir são registradas (junto com muitos 500s repetidos de tentar obter o favicon)
==> proxy-host-2_access.log <== [15/Aug/2023:17:03:34 +0000] - 400 400 - GET http hostname.domain "/portainer/" [Client 10.0.139.109] [Length 25] [Gzip -] [Sent-to hostname.domain] "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0" "-" ==> fallback_error.log <== 2023/08/15 17:03:34 [warn] 1471#1471: 512 worker_connections are not enough, reusing connections
It's simpler than you think, you just need to add a new location in custom locations in the location field /portainer/ and in the Forward Hostname / IP* fieldyour ip followed by / and the port number.
Because nginx itself already does the rest when saving the configuration
location /portainer/ {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_add_x_forwarded_for;
proxy_pass https://hostname.domain:9443/;
}
Issue is now considered stale. If you want to keep it open, please comment :+1:
Checklist
jc21/nginx-proxy-manager:latest
docker image?Describe the bug
I have the following location defined in an
nginx.conf
which functions exactly as expectedI figured it would be as easy as adding a new proxy host in Nginx Proxy Manager, adding the
/portainer/
location and setting the various proxy_header variables in theadvanced
section of the location. However, when I add literally any of theproxy_set_header
lines above, the location throws a 400. I cannot see anything really "useful" in the container logs for nginx-proxy-manager.Am I missing something?
Nginx Proxy Manager Version
v2.10.4
To Reproduce Steps to reproduce the behavior:
proxy_set_header X-Real-IP $remote_addr;
(for example) to the advanced section of the locationExpected behavior
I would expect the
proxy_set_header
values to be respected. Additionally, if there is a configuration error occurring, some form of notification seems like a plusScreenshots
I can provide these if needed
Operating System
Additional context
Running under compose using the following docker compose script
The only thing any of the log files emits on save is
And on hitting the created endpoint, the following 2 things are logged (along with lots of repeated 500s of trying to get the favicon)