Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

438
Visualizações
Embedded Grafana in Gitlab not working via Reverse Proxy

When trying to visit the url (as admin): https://gitlab.domain.com/-/grafana I am encountered with a 404 Page not found error.

So when trying to visit the Grafana monitoring (provided via GitLab) instance I am faced with a 404 Page not Found error.

Grafana is running on port 3000 so curl localhost:3000 outputs:

<a href="/-/grafana/login">Found</a>.

I have tried adding the following location blocks to my Apache configuration

<Location /-/grafana>
ProxyPassReverse http://127.0.0.1:3000/
</Location>

and

<Location /-/grafana>
    ProxyPass http://127.0.0.1:3000
    ProxyPassReverse http://127.0.0.1:3000
</Location>

These are my apache configurations:

<VirtualHost *:80>
  ServerName gitlab.domain.com
  ServerSignature Off
  ProxyPreserveHost On

  AllowEncodedSlashes NoDecode

  <Location />
    Require all granted

    ProxyPassReverse http://127.0.0.1:8181
    ProxyPassReverse http://example.com/
  </Location>

  RewriteEngine on

  DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public

RewriteCond %{SERVER_NAME} =gitlab.example.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

and for https:

<IfModule mod_ssl.c>
SSLStaplingCache shmcb:/var/run/apache2/stapling_cache(128000)
<VirtualHost *:443>
  ServerName gitlab.example.com
  ServerSignature Off

  ProxyPreserveHost On

  AllowEncodedSlashes NoDecode

  <Location />
    Require all granted

    ProxyPassReverse http://127.0.0.1:8181
    ProxyPassReverse http://example.com/
  </Location>


RequestHeader set Host "gitlab.example.com"
RequestHeader add X-Forwarded-Ssl on
RequestHeader set X-Forwarded-Proto "https"
  RewriteEngine on

  #Forward all requests to gitlab-workhorse except existing files like error documents
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
  RewriteCond %{REQUEST_URI} ^/uploads/.*
  RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA]
  DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public

</VirtualHost>
</IfModule>

Unfortunately neither of the location blocks work. I have placed both blocks in both the port 80 apache configuration and port 443 configuration but I am still stuck with the 404 error page.

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda