hi all,
i have aspera servers and there webroot is in a unique location ie
/opt/aspera/shares/etc/nginx/nginx.conf
ssl_certificate /path/to/cert;
ssl_certificate_key /path/to/key;
so when i run certbot, can i do this
certbot certonly --webroot -d domain.com /opt/aspera/shares/etc/nginx/nginx.conf
will this work
thanks,
rob
9peppe
April 2, 2022, 11:26am
2
A webroot is a directory in which your website is. It's usually /var/www/html
and matches the root
directive in nginx config.
But I think Certbot has a setting to tell it where the nginx config is. It's not --webroot
though.
2 Likes
Osiris
April 2, 2022, 11:39am
3
As @9peppe already said, your concept of "webroot" is incorrect. You probably mean the nginx server root directory. You can set it by using the --nginx-server-root
option.
Please also see the output of:
certbot --help nginx
to get the help output for the nginx plugin.
2 Likes
rg305
April 3, 2022, 5:15am
4
And the order is incorrect; You wrote --webroot -d domain.com
and then the supposed webroot path.
The correct order is:
--webroot -w "path"
and then the domain(s).
So, to answer your question:
robertkwild:
will this work
I'd say "no" (for several reasons)
1 Like
9peppe
April 3, 2022, 5:30am
5
... and if you want to know why is that, that's because you can have multiple webroots in the same command, each applies to the domains that follow:
certbot --webroot -w /var/www/site1 -d site1.example.com -w /var/www/site2 -d site2.example.com
etc etc.
Do that if you want a single certificate for two sites that do not share a webroot.
2 Likes
makes sense, thank you guys
2 Likes
system
Closed
May 5, 2022, 1:14pm
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.