Certbot blew-up my Apache

My domain is: www.johnm.site

I ran this command: sudo certbot --apache

It produced this output: Apache stopped working and won't restart. And I received a Syntax error message. I believe that the error message refers to my ServerAlias, which is the same as my domain name. The area in the Apache Log of the syntax error is:

Listen 80
<VirtualHost *.80>
    DocumentRoot  /var/www/html/
    ServerAlias www.johnm.site  </VirtualHost>

I'm a student, and totally new to Apache, so it's possible I've made a dumb mistake somewhere, while building my virtual server. Right now, I can't get Apache started. So I'm wondering if I need to remove Apache, and reinstall it. But I'm not sure how to do that and my instructor is MIA. Any suggestions are appreciated. One other question: Is Apache really that fragile?


Hi @johnny1, and welcome to the LE community forum :slight_smile:

I see some issues with that "code".

  • The listen statement is outside the vhost [not sure why it is even being used]
  • The vhost definition has "*.80" which should be "*:80"
    dot 80 refers to an FQDN[or IP] that ends with ".80
    colon 80 refers to the port being used
  • It has an "Alias", but it has no "Name"
    [above ServerAlias] add: ServerName johnm.site

Then review the overall "use", with the output of:
sudo apachectl -t -D DUMP_VHOSTS
[if you don't know how to read it OR just want a second set of eyes to confirm/deny any suspicions... post it here for our review]

Well, you did "hit it" quite hard - LOL
But, in general, I find Apache to be quite the opposite - it tries to "work" at all costs [sometimes that isn't such a good thing]


Sorry, I asked you to add the name "johnm.site", but that name has NO IP.
So, proceed with caution.
If you do need that name, add an IP to it.
If you don't need that name, change "ServerAlias" to "ServerName" [and only use the "www" name].


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