因此,我试图在脚本中自动化certbot。当我运行此sudo certbot --nginx -d your_domain -d www.your_domain
我得到以下内容:
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
-------------------------------------------------------------------------------
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel):
我的问题是,我可以以某种方式使它自动选择选项号2
而不问这个问题吗?
换句话说,以某种方式在2
命令中指定了选项sudo certbot --nginx -d your_domain -d www.your_domain
,而没有交互作用。