Moving phpmyadmin to a subdomain

Hi there,

I recently installed HCP on an Oracle instance with all the required ports opened etc. It’s running perfectly and I am very glad that I found out about HCP. One problem that I am now facing though is that I can’t open PhpMyAdmin on the subdomain that hestia control panel is hosted on. I can open my HCP phpmyadmin on https://dom.ain/phpmyadmin, but I would much rather have it accessible on https://hcp.dom.ain/phpmyadmin. Is this possible? And if so, how can I do that?

EDIT: some additional info: Hestia seems to (correctly) think that it’s hosted on the hcp subdomain, because when I click on the Phpmyadmin page on any of the users, it redirects them to hcp.dom.ain/phpmyadmin, which won’t work.

Thanks in advance,

Hi @emiellr,

It should work out of the box.

What is the error you see in the logs?

Show the output of these commands (replace hcp.dom.ain by your actual domain):

v-list-web-domains admin | column -t
grep -ri phpmyadmin /home/admin/conf/web/hcp.dom.ain/

The first command returns an empty table (headers are shown, no domains). The /home/admin/conf/web directory is empty.

As for the logs, they’re basically a long list of IPs being added and removed from the ban list. There is no error related to the issue to be seen.

You should have hcp.dom.ain added as web site to your admin user, it should be added on install. Did you deleted it?

I haven’t deleted any domains afaik

Maybe something worth noting: one of the regular users (mine) uses the tld for hosting purposes. So dom.ain points to a website hosted on the hcp server, while hcp.dom.ain is used for hestia.

Execute this command as root, without arguments and it will add the hostname and will get a certificate for your domain:


Did that, and it’s complaining that hcp.dom.ain belongs to a different user (mine probably). Am I wrong in having dom.ain used for hosting and hcp.dom.ain used for hestia?

Then you have two options:

1.- Add hcp.dom.ain web site to your user (the one that already has dom.ain)


2.- Change Hestia’s policy so several users can use sub domains from the dame domain:
v-change-sys-config-value ENFORCE_SUBDOMAIN_OWNERSHIP no
And now you could add the domain and cert to admin user:

I’ll try that in a minute. Thank you so much for your really fast help! <3

1 Like

Ok I presume that the command is to add a host to a user with letsencrypt. I am however using the hcp domain behind a cloudflare proxy with a root cert and I don’t want to stop using that.

Then use option 1, simply add hcp.dom.ain to your user.

1 Like

Alright so I now have hcp running on hcp.dom.ain and it’s using let’sencrypt anyway, I’ll figure out Cloudflare later. Can I now also run HCP on port 80/443, or is that not a good idea?

Sorry but I don’t know how you have configured hcp.dom.ain in Cloudflare, also, I don’t use Cloudflare so don’t know what are the options there but I see no problem adding hcp.dom.ain as a web site in Hestia.