Apache and v6

The issue I am facing:
I wish to upgrade to v6.

I have v5 working fine under debian, using Apache to serve pihole's pages at https://example.com/admin. (where example.com is replaced by the name of my domain)
I also already have another server running on port 8080.

Will the update process recognise that 8080 is also in use, and offer me the chance to select my own port?

How will I need to change my apache setup to redirect requests to https://example.com/admin to v6's built in server?

Details about my system:
See above. I am also running unbound.

What I have changed since installing Pi-hole:

Just added a few local DNS names.

<VirtualHost *:443>

.....

        RewriteEngine On
        RedirectMatch ^/$ /admin/

        <Location />
                Include /etc/apache2/sites/htaccess
        </Location>

        <Location /admin>
                Include /etc/apache2/sites/htaccess

                ProxyPass http://127.0.0.1:81/admin/
                ProxyPassReverse http://127.0.0.1:81/admin/
        </Location>

        <Location /api>
                Include /etc/apache2/sites/htaccess

                ProxyPass http://127.0.0.1:81/api
                ProxyPassReverse http://127.0.0.1:81/api
        </Location>
</VirtualHost>

This should get you going again, for some reason /admin/ needs a trailing / while /api doesn't work with it.

2 Likes

Thanks. I get the idea.

Any clue about how I tell the v6 upgrade to use port 81 as this suggests?

Check the new parameters: Upgrading from v5.x - Pi-hole documentation

A lot have been renamed/removed.

1 Like

Keep in mind these are docker-specific instructions (mind, setting environment variables is also supported on bare metal)

But you can set the web port in /etc/pihole/pihole.toml

2 Likes

Thanks. I have everything working as I want now. I decided it was easier just to access pihole on its own port, as I will only ever access it from a bookmark, and edited pihole.toml to set the port.

2 Likes

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.