Reconfigure domain?


#1

Hello,

I was trying the auto utility to generate and install a cert with Apache, but when it asked me for the virtual host I selected the wrong one.

Now https:// it’s redirecting to the wrong virtual host.

Is it possible to reconfigure it, or completely delete the process (whatever it did) so I can run the utility again and select the correct virtual host this time?

Or any other way to fix it?

Regards.


#2

I don’t know of any built-in way, but the utility does not do anything magic, it just edits config files. In Linux, you can find the apache config files at /etc/apache2, most specifically /etc/apache2/sites-enabled. Regarding the utility, you can find it at /etc/letsencrypt (if it has not been renamed to /etc/certbot yet, I’m not sure…). Possibly there are also .htaccess files somewhere in your static directories.

You could manually edit the Apache config files to not redirect to the wrong HTTPS host (but not to redirect at all) and then remove the /etc/letsencrypt folder to be able to restart the process in a clean manner. But remember to make backups of both folders before making any changes!

Best regards


#3

I ended up modifying the /etc/apache2/sites-available/ files manually and doing it myself as always.

Does the auto renew utility do something to Apache if I ran the auto utility first? I set up a cron job and wouldn’t like it to screw up what I just did to the sites configs.


#4

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