Need help for configuration with apache2 subdomain and subpath

  • What Grafana version and what operating system are you using?
  • Ubuntu 20.04.6 LTS
  • Grafana : 10.2.0

Note : _ are add in “url”

  • What are you trying to achieve?
    I try to setup grafana on a specific web (working) configuration on apache :

https_:// => an index page
https_:// => grafana
https_:// => other stuff

With tls redirection & websocket working.

And be sure my conf is valid.

ALL STUFF is behind F5 which i have no access. But error can come from that side too.
And the TLS is not currently fully setup (have a tls for i “accept” the risk).

  • How are you trying to achieve it?

Setup conf file (apache and grafana)

  • What happened?

Currently not working.

  • What did you expect to happen?
    A working configuration.

  • Can you copy/paste the configuration(s) that you are having problems with?

Directory structure :
The apache conf :

<VirtualHost *:80>
  DocumentRoot /var/www/sub/webroot

  RewriteEngine On
  RewriteCond %{REQUEST_URI} !^/\.well\-known/acme\-challenge/
  RewriteRule ^(.*)$ https_://%{HTTP_HOST}$1 [R=301,L]

  # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
  # error, crit, alert, emerg.
  # It is also possible to configure the loglevel for particular
  # modules, e.g.
  # LogLevel info ssl:warn
  LogLevel info

  ErrorLog ${APACHE_LOG_DIR}/error-sub.log
  CustomLog ${APACHE_LOG_DIR}/access-sub.log combined

<VirtualHost *:443>

  DocumentRoot /var/www/sub/webroot

  Alias /subpath2 /var/www/sub/subpath2/
  <Directory /var/www/sub/subpath2/>
     Options Indexes FollowSymLinks MultiViews
     Require all granted

   <location "/sub/subpath1/" >
     ProxyPreserveHost On
     ProxyPass "http_://"
     ProxyPassReverse "http_://"
     RewriteEngine on
     RewriteCond %{HTTP:Upgrade} websocket [NC]
     RewriteCond %{HTTP:Connection} upgrade [NC]
     RewriteRule ^/?(.*) "ws://$1" [P,L]

    ErrorLog ${APACHE_LOG_DIR}/error-sub-ssl.log
    CustomLog ${APACHE_LOG_DIR}/access-sub-ssl.log combined


The relevant part of my grafana.ini

protocol = http
http_addr =
http_port = 3000
domain =
enforce_domain = false
root_url = %(protocol)s://%(domain)s/subpath1
serve_from_sub_path = true
  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

Only 404 error or wrong redirection apache2 side. but i probably miss something.

  • Did you follow any online instructions? If so, what is the URL?
    Not remember exact url but mostly here and official documentation.