Nginx configures web sites with HTTPS by default

Install Nginx

yum install nginx -y
Copy the code

Modify nginx.conf

vim /etc/nginx/nginx.conf
Copy the code

Set the value from 80 to 443

Configure HTTPS (see — my blog is a PHP project)

Start nginx

systemctl start nginx
Copy the code

Effect of four,