Unrecognized arguments

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. crt.sh | 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: grithealthfitness.com

I ran this command: sudo certbot --apache -grithealthfitness.com -d www.grithealthfitness.com

It produced this output:certbot [SUBCOMMAND] [options] [-d DOMAIN] [-d DOMAIN] ...

Certbot can obtain and install HTTPS/TLS/SSL certificates. By default,
it will attempt to use a webserver both for obtaining and installing the
certificate.
certbot: error: unrecognized arguments: -grithealthfitness.com

My web server is (include version): Apache HTTP Server Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-88-generic x86_64)

The operating system my web server runs on is (include version): Microsoft Windows 10 Home 10.0.19042 N/A Build 19042

My hosting provider, if applicable, is:

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):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):(0.39.0-1)

1 Like

Hi @edafeemmanuel21 and welcome to the LE community forum :slight_smile:

There is a typo in the following:

Try:
sudo certbot --apache -d grithealthfitness.com -d www.grithealthfitness.com

2 Likes

Hi , thanks for your response. I just tried it now, this is the response i got

root@wordpress-ubuntu-s-1vcpu-1gb-intel-nyc1-01:~# sudo certbot --apache -d grithealthfitness.com -d www.grithealthfitness.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for grithealthfitness.com
http-01 challenge for www.grithealthfitness.com
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-enabled/000-default-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-enabled/000-default-le-ssl.conf

We were unable to find a vhost with a ServerName or Address of www.grithealthfitness.com.
Which virtual host would you like to choose?


1: 000-default.conf | Multiple Names | | Enabled
2: 000-default-le-ssl.conf | Multiple Names | HTTPS | Enabled


2 Likes

what should i do next?

1 Like

Show the output of:
sudo apachectl -t -D DUMP_VHOSTS

2 Likes

Hi there, sorry for the late response. This was the result i got after inputting sudo apachectl -t -D DUMP_VHOSTS

root@wordpress-ubuntu-s-1vcpu-1gb-intel-nyc1-01:~# sudo apachectl -t -D DUMP_VHOSTS
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:80 gritheathfitness.com (/etc/apache2/sites-enabled/000-default.conf:4)

Let's have a look at:
/etc/apache2/sites-enabled/000-default.conf

1 Like

root@wordpress-ubuntu-s-1vcpu-1gb-intel-nyc1-01:~# /etc/apache2/sites-enabled/000-default.conf
-bash: /etc/apache2/sites-enabled/000-default.conf: Permission denied

Try:
cat /etc/apache2/sites-enabled/000-default.conf

root@wordpress-ubuntu-s-1vcpu-1gb-intel-nyc1-01:~# cat /etc/apache2/sites-enabled/000-default.conf

# Added to mitigate CVE-2017-8295 vulnerability
UseCanonicalName On

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        
        ServerName gritheathfitness.com
        ServerAlias www.gritheathfitness.com
        
        DocumentRoot /var/www/html

        <Directory /var/www/html/>
            Options FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
1 Like

this is what i got

That contradicts:

Unless it doesn't know how to do ServerAlias.

Please show the output of:
grep -i load /etc/apache2/mods-enabled/* | grep -i alias

I get:

/etc/apache2/mods-enabled/alias.load:LoadModule alias_module /usr/lib/apache2/modules/mod_alias.so
/etc/apache2/mods-enabled/vhost_alias.load:LoadModule vhost_alias_module /usr/lib/apache2/modules/mod_vhost_alias.so
2 Likes

it gives me this output. this is my first time creating a website, i can't really tell where i made a wrong command or input.

root@wordpress-ubuntu-s-1vcpu-1gb-intel-nyc1-01:~# grep -i load /etc/apache2/mods-enabled/* | grep -i alias

/etc/apache2/mods-enabled/alias.load:LoadModule alias_module /usr/lib/apache2/modules/mod_alias.so

What shows?:
certbot certificates

I think you could benefit by updating certbot version.

1 Like

root@wordpress-ubuntu-s-1vcpu-1gb-intel-nyc1-01:~# certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log


Found the following certs:
Certificate Name: grithealthfitness.com
Domains: grithealthfitness.com www.grithealthfitness.com
Expiry Date: 2022-03-09 15:55:13+00:00 (VALID: 84 days)
Certificate Path: /etc/letsencrypt/live/grithealthfitness.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/grithealthfitness.com/privkey.pem


root@wordpress-ubuntu-s-1vcpu-1gb-intel-nyc1-01:~#

what do you think?

I think you have a valid cert and the only errors I see may be fixed by upgrading certbot.

1 Like

DAM - we are all blind!
Both of those are missing the "L" in heaLth.

2 Likes

uh oh,,, my bad. i've been unaware of this all these while. thanks for the observation. how do i correct this?

1 Like

Start by locating any files that may contain the misspelling (within the web server):
grep -ERi gritheath /etc/apache2/

From that list, edit them (one by one) using your favorite text editor.
Like:
vi /etc/apache2/sites-enabled/000-default.conf

Insert the "L" (in lower case) and save the files.
Once all have been updated, then restart (or reload) the web service.

2 Likes