I have installed Pi-Hole on my Ubuntu 18.04.4 box running apache 2.4.29. The admin dashboard is working when I navigate to the server's IP address, however I would like to use a vHost to point a subdomain to it.

The vHost I have has been reproduced below. The admin dashboard is appearing but none of the links/graphs embedded within it are. I assume this is because the vHost file is not handling relative urls/paths correctly.

Could someone help explain what changes I need to make to the vHost file in order for relative paths/urls to work in this case? The Pi-Hole admin folder is at /var/www/html/admin on my server.


<VirtualHost *:80>
ProxyPass http://**SERVER IP**/admin/
ProxyPassReverse http://**SERVER IP**/admin/

Use below rewrite rule and test.

ProxyPass / http://**SERVER IP**/
ProxyPassReverse / http://**SERVER IP**/
  • The relative paths for the links are now working but the data to populate the graphs and graphics are still not. See install here. Thanks for your help! – Theo Bearman Jun 6 '20 at 8:51
  • Could you please share sample output of backend server – Pandurang Jun 6 '20 at 9:08
  • Is your application on the same Apache instance at /var/www/html/admin. If yes then you don't need ProxyPass.Simply use DocumentRoot /var/www/html/admin inside VirtualHost. Restart Apache httpd and test. – Pandurang Jun 6 '20 at 9:36
  • Tried this and the data is still not populating the graphs and graphics. I can log in though, so clearly a database connection is successfully being made somewhere. – Theo Bearman Jun 6 '20 at 21:24
  • This looks like application issue.you can check error log and access log for more information – Pandurang Jun 7 '20 at 0:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.