How to set up let's encrypt https after moving site to new server

However, I’m not sure apache is working on 443.

I do have virtual host file for 443 and ports.conf are pointing to 443, but using ss -tulpn, i don’t see the apache running on 443.

Even though I haven’t changed the DNS settings to point to the new server, if everything working ok after moving the certs to the new server, I should be able to load the site editing the hosts file in Windows 10, right?

FYI, I have merged two separate topics that @mhweb created about the same problem, so they’ll now both appear on this same thread. Thanks all for the help!

1 Like

What says?:
apachectl -S


Main DocumentRoot: "/var/www/html" Main ErrorLog: "/var/log/apache2/error.log" Mutex watchdog-callback: using_defaults Mutex rewrite-map: using_defaults Mutex default: dir="/var/run/apache2/" mechanism=default Mutex mpm-accept: using_defaults PidFile: "/var/run/apache2/" Define: DUMP_VHOSTS Define: DUMP_RUN_CFG User: name="www-data" id=33 Group: name="www-data" id=33

If that is all of it, then there is definitely somethings missing from your config.
Primarily content such as:

VirtualHost configuration:
*:80 (/etc/apache2/sites-enabled/000-default.conf:1)
ServerRoot: "/etc/apache2"

Where is the location for that VirtualHost config that you’re referring too? because i’m using the same virtualhost files as in the old server.


Once I move the letsencrypt files to the new server, do I have to run any letsencrypt commands?

I’m not referring to any specific file.
My point is that your apachectl -S response does NOT return any bound port nor related conf file.

Your config says your NOT using any - the files may be there but they are NOT being used.

Not immediately.
But you will have to insure that (attempts to) renewal are being processed daily and do renew correctly before your certs expire.

How do I make the server use the virtualhost files?

Find the path where your vhost config files are and add the following in your apache.conf file:

Include /path/to/vhost/dir/*.conf

1 Like

I’m going to start over with a new vps.

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