配置服务器
修改主机名并安装Nginx,并配置启动
1. [root@iZ2zejd3somo0s3y9hqvzeZ ~]# hostnamectl set-hostname test1 2. [root@iZ2zejd3somo0s3y9hqvzeZ ~]# bash 3. [root@test1 ~]# yum -y install nginx 4. [root@test1 ~]# vim /etc/nginx/nginx.conf 5. server { 6. listen 80; 7. server_name test.koten.vip; 8. root /usr/share/nginx/html; 9. } 10. [root@test1 ~]# nginx -t 11. nginx: the configuration file /etc/nginx/nginx.conf syntax is ok 12. nginx: configuration file /etc/nginx/nginx.conf test is successful 13. [root@test1 ~]# systemctl restart nginx
配置页面
[root@test1 ~]# echo '我是koten' > /usr/share/nginx/html/index.html
购买并配置证书
证书申请、绑定、验证、审核