ZPANEL and PHPMYADMIN - Do not work after installing certbot

Hello friends,

After configuring LETS ENCRYPT on the server, installing the digital certificate, I lost access to ZPANEL from the same server. That is, before setting up the digital certficado I accessed the ip of my server ZPANEL (for example typing in the browser directly 99.555.444.55) and after configuring certbot, when entering the ip of the server, it directs to the site that I installed the certificate . I no longer have access to ZPANEL!

I lost access also to phpmyadmin (before it was server ip / path / phpmyadmin, now it also directs to the site that I configured the script …)

I need to configure the certificate and can continue using ZPANEL and phpmyadmin

thank you!

You don’t say how you installed the cert.

If you used certbot to auto configure your server, I’d suggest using the “rollback” option to recover the old config.

If not, can you explain what commands you did use ? Do you have a backup of your webserver config ? Without any other information ( sich as your OS, webserver type etc) it’s impossible to give accurate info.


First of all, thank you for answering my question.

I used the instructions of: https://bobcares.com/blog/setup-lets-encrypt-centos-6-centos-7/

summing up

# Yum -y update

# Yum -y install epel-release

# Wget https://dl.eff.org/certbot-auto

# Chmod 755 certbot-auto

# Certbot --apache

Soon, it opened the configuration screen where I chose my site to apply HTTPS
(Which names would you like to activate HTTPS for?)
-> i select my domain

In sequence:
(PLease choose whether HTTPS access is required or optional)

-> Secure all requests redirect to secure HTTPS access

I’m using:
Apache Version: 2.2.15
PHP Version: 5.3.3
MySQL Version: 5.1.73
ZPanel Version: 10.1.1

I would like to learn how to configure manually, to keep access to ZPANEL, PHPMYADMIN and WEBMAIL (postfix)

Grateful !

From what you have done, my understanding is that, you have overwritten the apache config files that ZPanel uses to access various things ( like zpanel, phpmyadmin, webmail ). Generally you shouldn’t run two different things ( certbot and zpanel) which modify the same files, without them understanding each other.

Do you have a backup of your apache config from before you ran “certbot --apache” ?

I’d try running “certbot rollback” and hopefully (as long as you haven’t changed anything else since) it will revert the files to how they were. If not I’d restore the apache configs from your backup.

If neither of the above work, then I’d need more details about your setup and config files.

Once you have things working again, then use certbot in the “certonly” mode to obtain a certificate - but not make changes to your apache config. You can then tell ZPanel about the cert files, and get the two working together nicely.

Okay, how would the procedure be for:

“Once you have things working again, then use certbot in the” certonly “mode to obtain a certificate - but do not make changes to your apache config.You can then tell ZPanel about the cert files, and get the two working together nicely.” ?

Thank you!

Have you got everything working back again, so you can access zpanel, website, webmail, phpmyadmin) ?

If so, what’s the webroot for the domain you want a certificate for ( or do you want it for multiple domains) ?

Yes, I already have everything working.

Initially I have 2 domains, but I will treasure for multiple domains

One is: / public_html / bware_com_br

Is that what you asked? Sorry, I’m using a translator :slight_smile:

If you just want a certificate for "bware.com.br" and "www.bware.com.br" then try

certbot certonly --webroot -w /public_html/bware_com_br/ -d bware.com.br -d www.bware.com.br

The certificates would be placed in a folder - /etc./letsencrypt/live/bware.com.br/

If you wanted a certificate that also has a a domain with a different webroot location then use

certbot certonly --webroot -w /public_html/bware_com_br/ -d bware.com.br -d www.bware.com.br -w /var/www/other -d other.net.br -d www.other.example.net.br

Let me see if I understood, I have the domains bware.com.br and another calling guiadobem.com.br. Both are in / public_html

Then it would be:

Certbot certonly --webroot -w / public_html / bware_com_br / -d bware.com.br -d www.bware.com.br -w /public_html/guiadobem.com.br -d guiadobem.com.br -d www.guiadobem .com.br

Another thing. How do I install certbot correctly?
I follow the procedure:

Remembering I’m with Centos 6.7, Apache 2.2

Yes, that's fine.

correct. It's slightly unusual that the files are in /public_html rather than in /var/www/public_html or /home/user/public_html but if it is just /public_html then all is good.

This is also assuming you want a single certificate for all four FQDN's. If you want 2 different certs ( one for bware.com.br / www.bware.com.br and the other for guiadobem.com.br / www.guiadobem.com.br ) then you should just include the certificates you want in each certificate, i.e.

certbot certonly --webroot -w /public_html/bware_com_br / -d bware.com.br -d www.bware.com.br


certbot certonly --webroot -w /public_html/guiadobem.com.br -d guiadobem.com.br -d www.guiadobem .com.br

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