0

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.

Thanks!

<VirtualHost *:80>
ServerName **PREFERRED URL NAME**
ServerAlias **PREFERRED WEBSITE NAME**
ProxyPass http://**SERVER IP**/admin/
ProxyPassReverse http://**SERVER IP**/admin/
</VirtualHost>

1 Answers1

0

Use below rewrite rule and test.

ProxyPass / http://**SERVER IP**/
ProxyPassReverse / http://**SERVER IP**/
Pandurang
  • 111
  • 1
  • 4
  • The relative paths for the links are now working but the data to populate the graphs and graphics are still not. See [install here](https://pihole.theobearman.com/). Thanks for your help! – Theo Bearman Jun 06 '20 at 08:51
  • Could you please share sample output of backend server – Pandurang Jun 06 '20 at 09: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 06 '20 at 09: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 06 '20 at 21:24
  • This looks like application issue.you can check error log and access log for more information – Pandurang Jun 07 '20 at 00:36