This article only Centos6.x test no problem, 7+ self-test
Deployment certbot
wget https://dl.eff.org/certbot-auto
cp certbot-auto /usr/bin/
chmod a+x /usr/bin/certbot-auto
Install Certificate
./certbot-auto certonly
Nginx configuration
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name your domain name;
root /usr/share/nginx/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
}
}
server{
listen 443;
server_name your domain name;
ssl on;
root /usr/share/nginx/html;
ssl_certificate your certificate;
ssl_certificate_key your certificate;
}
Note: When copying and pasting format requires its own alignment
nginx -t
# Check syntactic correctness
nginx -s reload
# Reload the configuration file
Browser Access Project https + domain, verification certificate, no problem!
No pro-test pit! ! !