Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
My domain is:nc.hezner.biz
I ran this command:certbot renew --dryrun
It produced this output:Failed Unable to find a virtual host listening on port 80 âŚ
My web server is (include version):Apache 2.4.6-45
The operating system my web server runs on is (include version):Centos 7
My hosting provider, if applicable, is:none
I can login to a root shell on my machine (yes or no, or I donât know):yes
Iâm using a control panel to manage my site (no, or provide the name and version of the control panel): no
The version of my client is (e.g. output of certbot --version or certbot-auto --version if youâre using Certbot): certbot 0.0.29
I got the email that TLS-SNI-01 was being discontinued. Just before my certificate expired and just before the TLS-SNI-01 was due to cut off I renewed the certificate. I have a current certificate that is good till May 10, 2019. After I renewed the certificate I updated Certbot from version 0.12 to current version 0.29. I then tried the dry-run which failed as described above. This is a simple server, not virtualized, that has only the NextCloud on it.
When I ran the httpd -S command it returned:
Virtual Host configuration: :443 nc.hezner.biz (etc/httpd/conf.d/ssl.conf:56)
Server root: â/etc/httpdâ
Main Documentation Root: â/var/www/html/nextcloudâ
Main Error Log: â/etc/httpd/logs/error.logâ
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex auth-socache: using_defaults
Mutex ssl-cashe: using_defaults
Mutex default: dir=ârun/httpd/â mechanism=default
Mutex mpm-accept: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex proxy-balaner-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex authdigest-client: using_defaults
PIDFile: â/run/httpd/httpd.pidâ
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name=âapacheâ id=48
Group: name=âapacheâ id=48
In /etc/httpd/conf there is httpd.conf which includes the lines âListen 80â and 'IncludeOptional conf.d/.conf
In /etc/httpd/conf.d there is ssl.conf which includes the lines âListen 443 httpsâ and â<VirtualHost_default_:443>â
I tried creating a vhost80.conf file in /etc/httpd/conf.d with the contents
<VirtualHost *:80>
DocumentRoot: â/var/www/html/nextcloudâ
ServerName nc.hezner.biz
But httpd.service would not restart with that file in there so I removed it. I tried other similar experiments none of which worked. Iâve tried reading the various posts and how-to-create-a-virtual-host articles but am certainly missing something. Iâm not any expert but can usually Google and follow directions sucessfully. However I have not figured it out yet.
Please help. Thank you, Pat
Prior to me getting LetsEncrypt on this server it was running on port 80 sucessfully so know that port 80 has been open and functiong. I have not closed any ports in the main firewall. Would adding LetsEncrypt close a firewall port on the server itself?
I know that it had been open in the past. Iâll go back through notes and see if part of the instructions on the guide that I followed to get LetsEncrypt working had me do something that blocked 80.
When i edit the httpd.conf to add those lines right after the âListen 80â line, save the file, and run systemctl restart httpd.service it fails. When I look at systemctl status httpd.service is shows the service as failed
I had been doing some troubleshooting and did go back and re-add http to the fire wall but did not think that work as it was not listed when I ran the fireswall-cmd --list-all command.
That is good news that you can see it running. Iâll go back now and uncomment those lines in httpd.conf to see if that works now.
Or is there something else/additional that I should do to fix the redirect?
Check your config to find the (port 80) redirect -> login.
Add before something like
RewriteRule ^/\.well-known/ - [L]
If the path starts with /.well-known/, there is no action. Then recheck the domain to see if it works. Browsers have trouble to check redirects, they cache the result.
I donât find any lines in the httpd.conf that talk about (port 80) redirect ->login. I looked through the file several times. Do you have any guess about where in the file it would be? I can send more screen shots of the file if that would help.
I uncommented the virtual host lines, saved and tried to restart httpd.service. It sill fails.
Here is a screen shot of where Iâve inserted the virtual host info. Do see the syntax error on the <VirtualHost *:80> line?
Thanks so much for your help with this.