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 Answer 1

0

Use below rewrite rule and test.

ProxyPass / http://**SERVER IP**/ ProxyPassReverse / http://**SERVER IP**/ 
5
  • 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! Commented Jun 6, 2020 at 8:51
  • Could you please share sample output of backend server Commented Jun 6, 2020 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. Commented Jun 6, 2020 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. Commented Jun 6, 2020 at 21:24
  • This looks like application issue.you can check error log and access log for more information Commented Jun 7, 2020 at 0:36

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.