一、配置linux客户端免密登录服务端linux主机的root用户
1、 创建密钥对 ssh-keygen -t rsa
3、复制公钥文件到Linux主机 ssh-copy-id root@192.168.189.4
4、免密登录主机 ssh root@192.168.189.4
二、配置web服务器,当访问网站www.haha.com时显示: haha
1、将主机名映射到ip地址 vim /etc/hosts
2、创建目录 mkdir /www/zuoye
3、echo haha > /www/zuoye/index.html
4、vim /etc/nginx/conf.d/haha.conf
5、systemctl restart nginx.service
三、配置web服务器,当访问网站www.xixi.com/secret/显示:this is secret
1、创建目录 mkdir /www/secret/
2、echo this is secret > /www/secret/index.html
3、vim /etc/nginx/conf.d/haha.conf
4、systemctl restart nginx.service