Debugging webroot issues on new web server

Try adding these two options to your Certbot command to help debug

--debug-challenges -v 

It will create the challenge token file and then pause. Do NOT press enter to continue but use a different machine to try to reach the URL you will be shown. It may be tedious to try because the URL is so long but maybe it helps anyway.

Usually a problem with --webroot and "404" (Not Found) error is simply that the -w folder does not match the DocumentRoot for the domain and URI. Various Apache config problems can cause it to behave oddly.

Show us the output of this so we can review

sudo httpd -t -D DUMP_VHOSTS

You might need apache2ctl or apachectl instead of httpd on your distro

Lastly, you can specify --webroot in the command in your first post to avoid being prompted for it.

3 Likes