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.