I get the HTTPS by opening 80 port in my ec2 instance. And running this command:
sudo certbot --nginx -d api.geeknoon.com
this add some code in my nginx file:
sudo cat /etc/nginx/sites-available/geeknoon_server
server {
server_name api.geeknoon.com;
location = /favicon.ico { access_log off; log_not_found off ; }
location /static/ { root /home/ubuntu/geeknoon_server; }
location / {
include proxy_params;
proxy_pass http://unix:/home/ubuntu/geeknoon_server/geeknoon_server.sock;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/api.geeknoon.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/api.geeknoon.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = api.geeknoon.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name api.geeknoon.com;
return 404; # managed by Certbot
}
and when i run thus: sudo certbot renew --dry-run
i get this error:
sudo certbot renew --dry-run
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/api.geeknoon.com.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert not due for renewal, but simulating renewal for dry run
Could not choose appropriate plugin: The manual plugin is not working; there may be problems with your existing
configuration.
The error was: PluginError('An authentication script must be provided with --manual-auth-hook when using the ma
nual plugin non-interactively.',)
Attempting to renew cert (api.geeknoon.com) from /etc/letsencrypt/renewal/api.geeknoon.com.conf produced an une
xpected error: The manual plugin is not working; there may be problems with your existing configuration.
The error was: PluginError('An authentication script must be provided with --manual-auth-hook when using the ma
nual plugin non-interactively.',). Skipping.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/geeknoon.com.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert not due for renewal, but simulating renewal for dry run
Could not choose appropriate plugin: The manual plugin is not working; there may be problems with your existing
configuration.
The error was: PluginError('An authentication script must be provided with --manual-auth-hook when using the ma
nual plugin non-interactively.',)
Attempting to renew cert (geeknoon.com) from /etc/letsencrypt/renewal/geeknoon.com.conf produced an unexpected
error: The manual plugin is not working; there may be problems with your existing configuration.
The error was: PluginError('An authentication script must be provided with --manual-auth-hook when using the ma
nual plugin non-interactively.',). Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/api.geeknoon.com/fullchain.pem (failure)
/etc/letsencrypt/live/geeknoon.com/fullchain.pem (failure)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
** DRY RUN: simulating 'certbot renew' close to cert expiry
** (The test certificates below have not been saved.)
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/api.geeknoon.com/fullchain.pem (failure)
/etc/letsencrypt/live/geeknoon.com/fullchain.pem (failure)
** DRY RUN: simulating 'certbot renew' close to cert expiry
** (The test certificates above have not been saved.)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2 renew failure(s), 0 parse failure(s)