Move Pihole to a different folder or maybe create virtual host


#1

Hi guys,

I wanted know if is somehow possible to move pihole to a different folder within lighttpd possibly pihole ?
So the admin can access the webgui through a different path in it is browser .
By entering in the browser for e.g http://localhost/pihole ?
This way I could also run and manage other services on the same Pi without running into conflicts when managing them from the browser.

thx,user4747


#2

Have you tried looking in the file /etc/lighttpd/lighttpd.conf and changing the line server.document-root to your preferred point of access?

I found this by looking into the install script.

There may need to be some other links needing changed within the files in the admin folder (once you move it), but I’m not sure as I haven’t delved in.

At least it’s a starting point.


#3

Yes I just modified my /etc/lighttpd/lighttpd.conf by adding a extra line

#server.document-root = "/var/www/html"
server.document-root = “/var/www/pihole”

and added a folder called pihole in “var/www”.
I also changed the owner for that new folder to www-data www-data and copied the content of “/var/www/html” to “/var/www/pihole”.
finally I restarted lighttpd and tried to access the webgui as 192.168.178.34/pihole.

However the browser replied with

“This 192.168.178.34 page can’t be found”

Does anybody have a idea of what I could be missing ?


#4

Each time you update pi hole the lighttpd.conf get replaced whit default one


#5

Thx for that hint.
However my pihole installation is brand new and I just double checked both lines are still there.


#6

After copying everything over and making the changes noted, make sure you are accessing the admin page at http://192.168.178.34/pihole/admin.


#7

Sorry guys.
the browser stills says

The webpage cannot be found.
I wounder where else to look